public class TaskResource
extends org.gcube.common.core.state.GCUBEWSResource
GCUBEWSResource that provides and publishes a runtime environment for a ExecutorTask.| Modifier and Type | Class and Description |
|---|---|
class |
TaskResource.TaskLog
Extends
GCUBELog to forward a selection of log messages to the log RP. |
| Constructor and Description |
|---|
TaskResource() |
| Modifier and Type | Method and Description |
|---|---|
ExecutorPluginContext |
getContext()
Returns the context of the task's plugin.
|
String |
getError()
Returns the value of the error RP.
|
Map<String,Object> |
getInputs()
Returns (a copy of) the task inputs.
|
String |
getLog()
Returns the contents of the log.
|
Map<String,Object> |
getOutputs()
Returns the task outputs.
|
String[] |
getPropertyNames() |
Calendar |
getStartTime()
Gets the value of the start time RP.
|
ExecutorTask |
getTask()
Returns the task.
|
protected String[] |
getTopicNames() |
protected void |
initialise(Object... args) |
void |
launch(org.gcube.common.core.scope.GCUBEScope scope)
Launches the task in a given scope.
|
void |
setContext(ExecutorPluginContext context)
Sets the context of the task's plugin.
|
void |
setError(String value)
Sets the value of the error RP.
|
void |
setInputs(Map<String,Object> inputs)
Sets the task inputs.
|
void |
setLog(String value)
Sets the value of the log RP.
|
void |
setOutputs(Map<String,Object> outputs)
Sets the taks's outputs.
|
void |
setStartTime(Calendar value)
Sets the value of the start time RP.
|
void |
setState(String value)
Sets the value of the state RP.
|
protected void |
setType(org.gcube.vremanagement.executor.stubs.TaskDescription value)
Sets the value of the type RP.
|
void |
stop()
Attempts to stop execution.
|
void |
store() |
getCurrentTime, getEPR, getPorttypeContext, getProperty, getPublisher, getResourcePropertySet, getServiceContext, getTerminationTime, getTopicList, initialise, initialiseContainers, inScope, load, publish, setPortTypeContext, setTerminationTime, unpublishgetID, getLock, getScheduledTasks, getScope, launchTask, onRemove, setID, setPersistenceDelegate, stopTaskpublic String[] getPropertyNames()
getPropertyNames in class org.gcube.common.core.state.GCUBEWSResourceprotected String[] getTopicNames()
getTopicNames in class org.gcube.common.core.state.GCUBEWSResourceprotected void initialise(Object... args) throws Exception
initialise in class org.gcube.common.core.state.GCUBEWSResourceExceptionpublic ExecutorPluginContext getContext()
public void setContext(ExecutorPluginContext context)
context - the context.public ExecutorTask getTask()
public void setStartTime(Calendar value)
value - the value.public Calendar getStartTime()
protected void setType(org.gcube.vremanagement.executor.stubs.TaskDescription value)
value - the value.public void setState(String value)
value - the value.public void setInputs(Map<String,Object> inputs)
inputs - the inputs.public Map<String,Object> getInputs()
public void setOutputs(Map<String,Object> outputs)
outputs - the outputs.public void setError(String value)
value - the value.public String getError()
public void setLog(String value)
value - the contents.public String getLog()
public void stop()
throws OperationNotSupportedException,
Exception
UnsupportedOperationException - if the task cannot be stopped.Exception - if the task could not be stopped.OperationNotSupportedExceptionpublic void launch(org.gcube.common.core.scope.GCUBEScope scope)
throws Exception
scope - the scope.Exception - if the task could not launched.public void store()
store in interface org.globus.wsrf.PersistenceCallbackstore in class org.gcube.common.core.state.GCUBEStatefulResource<org.gcube.common.core.state.GCUBEWSResourceKey>Copyright © 2015. All Rights Reserved.