TaskResource
Date: 2013-05-21

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gcube.vremanagement.executor.state
Class TaskResource

    java.lang.Object
      GCUBEWSResource
          org.gcube.vremanagement.executor.state.TaskResource

    public class TaskResource

extends GCUBEWSResource

An extension of `GCUBEWSResource` that provides and publishes a runtime environment for a `ExecutorTask`.

Author:
  Fabio Simeoni (University of Strathclyde)

Nested Class Summary
`class` | `TaskResource.TaskLog` Extends `GCUBELog` to forward a selection of log messages to the log RP.

Constructor Summary
`TaskResource()`

Method Summary
`ExecutorPluginContext` | `getContext()` Returns the context of the task's plugin.
`java.lang.String` | `getError()` Returns the value of the error RP.
`java.util.Map<java.lang.String,java.lang.Object>` | `getInputs()` Returns (a copy of) the task inputs.
`java.lang.String` | `getLog()` Returns the contents of the log.
`java.util.Map<java.lang.String,java.lang.Object>` | `getOutputs()` Returns the task outputs.
`java.lang.String[]` | `getPropertyNames()`
`java.util.Calendar` | `getStartTime()` Gets the value of the start time RP.
`ExecutorTask` | `getTask()` Returns the task.
`void` | `launch(GCUBEScope scope)` Launches the task in a given scope.
`void` | `setContext(ExecutorPluginContext context)` Sets the context of the task's plugin.
`void` | `setError(java.lang.String value)` Sets the value of the error RP.
`void` | `setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)` Sets the task inputs.
`void` | `setLog(java.lang.String value)` Sets the value of the log RP.
`void` | `setOutputs(java.util.Map<java.lang.String,java.lang.Object> outputs)` Sets the taks's outputs.
`void` | `setStartTime(java.util.Calendar value)` Sets the value of the start time RP.
`void` | `setState(java.lang.String value)` Sets the value of the state RP.
`void` | `stop()` Attempts to stop execution.
`void` | `store()`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TaskResource

    public TaskResource()

Method Detail

### getPropertyNames

    public java.lang.String[] getPropertyNames()

### getContext

    public ExecutorPluginContext getContext()

  Returns the context of the task's plugin.

  Returns:
    the context.

### setContext

    public void setContext(ExecutorPluginContext context)

  Sets the context of the task's plugin.

  Parameters:
    `context` - the context.

### getTask

    public ExecutorTask getTask()

  Returns the task.

  Returns:
    the task.

### setStartTime

    public void setStartTime(java.util.Calendar value)

  Sets the value of the start time RP.

  Parameters:
    `value` - the value.

### getStartTime

    public java.util.Calendar getStartTime()

  Gets the value of the start time RP.

  Returns:
    value the value.

### setState

    public void setState(java.lang.String value)

  Sets the value of the state RP.

  Parameters:
    `value` - the value.

### setInputs

    public void setInputs(java.util.Map<java.lang.String,java.lang.Object> inputs)

  Sets the task inputs.

  Parameters:
    `inputs` - the inputs.

### getInputs

    public java.util.Map<java.lang.String,java.lang.Object> getInputs()

  Returns (a copy of) the task inputs.

  Returns:
    the inputs.

### setOutputs

    public void setOutputs(java.util.Map<java.lang.String,java.lang.Object> outputs)

  Sets the taks's outputs.

  Parameters:
    `outputs` - the outputs.

### getOutputs

    public java.util.Map<java.lang.String,java.lang.Object> getOutputs()

  Returns the task outputs.

  Returns:
    the inputs.

### setError

    public void setError(java.lang.String value)

  Sets the value of the error RP.

  Parameters:
    `value` - the value.

### getError

    public java.lang.String getError()

  Returns the value of the error RP.

  Returns:
    the value.

### setLog

    public void setLog(java.lang.String value)

  Sets the value of the log RP.

  Parameters:
    `value` - the contents.

### getLog

    public java.lang.String getLog()

  Returns the contents of the log.

  Returns:
    the contents.

### stop

    public void stop()
              throws javax.naming.OperationNotSupportedException,
                     java.lang.Exception

  Attempts to stop execution.

  Throws:
    `java.lang.UnsupportedOperationException` - if the task cannot be stopped.
    `java.lang.Exception` - if the task could not be stopped.
    `javax.naming.OperationNotSupportedException`

### launch

    public void launch(GCUBEScope scope)
                throws java.lang.Exception

  Launches the task in a given scope.

  Parameters:
    `scope` - the scope.
  Throws:
    `java.lang.Exception` - if the task could not launched.

### store

    public void store()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD