org.gcube.vremanagement.executor.plugin
Class ExecutorPluginContext

java.lang.Object
  extended by org.gcube.common.core.plugins.GCUBEPluginContext
      extended by org.gcube.vremanagement.executor.plugin.ExecutorPluginContext

public abstract class ExecutorPluginContext
extends org.gcube.common.core.plugins.GCUBEPluginContext

Extends GCUBEPluginContext to provide the service with information about its plugin.

Subclasses must indicate the class of an executable ExecutorTask (cf. getTaskClass()).
They may also provide examples of the any inputs the task may take and any output the task may produce (cf. addSampleInput(DescriptiveProperty), addSampleOutput(DescriptiveProperty...)).
Finally, they may also indicate the time after which task executions that are completed or have failed can be forgotten (cf. getTimeToLive()).

Author:
Fabio Simeoni (University of Strathclyde)

Nested Class Summary
 
Nested classes/interfaces inherited from class org.gcube.common.core.plugins.GCUBEPluginContext
org.gcube.common.core.plugins.GCUBEPluginContext.TypeMapping
 
Field Summary
static int TIME_TO_LIVE
          Default task expiration delay.
 
Constructor Summary
ExecutorPluginContext()
           
 
Method Summary
protected  void addSampleInput(org.gcube.common.core.types.DescriptiveProperty inputs)
          Adds one or more sample inputs for the task.
protected  void addSampleOutput(org.gcube.common.core.types.DescriptiveProperty... outputs)
          Adds one ore more sample output for the task.
 org.gcube.vremanagement.executor.stubs.TaskDescription getDescription()
          Returns the description of the task.
 List<org.gcube.common.core.types.DescriptiveProperty> getSampleInputs()
          Returns sample inputs for the task.
 List<org.gcube.common.core.types.DescriptiveProperty> getSampleOutputs()
          Return sample outputs for the task.* @return the sample outputs.
abstract  Class<? extends ExecutorTask> getTaskClass()
          Return the type of the task.* @return the type.
 int getTimeToLive()
          Returns the time-to-live for completed or failed task, in minutes.@return the time-to-live.
 void setTaskDescription(org.gcube.vremanagement.executor.stubs.TaskDescription description)
          Sets the description of the task.* @param the description.
 
Methods inherited from class org.gcube.common.core.plugins.GCUBEPluginContext
addProperty, addTypeMappings, getPlugin, getProperties, getTypeMappings, initialise
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_TO_LIVE

public static final int TIME_TO_LIVE
Default task expiration delay.

See Also:
Constant Field Values
Constructor Detail

ExecutorPluginContext

public ExecutorPluginContext()
Method Detail

getDescription

public org.gcube.vremanagement.executor.stubs.TaskDescription getDescription()
Returns the description of the task. * @return the description.


setTaskDescription

public void setTaskDescription(org.gcube.vremanagement.executor.stubs.TaskDescription description)
Sets the description of the task.* @param the description.


getTaskClass

public abstract Class<? extends ExecutorTask> getTaskClass()
Return the type of the task.* @return the type.


getSampleInputs

public List<org.gcube.common.core.types.DescriptiveProperty> getSampleInputs()
Returns sample inputs for the task. @return the sample inputs.


getSampleOutputs

public List<org.gcube.common.core.types.DescriptiveProperty> getSampleOutputs()
Return sample outputs for the task.* @return the sample outputs.


addSampleInput

protected void addSampleInput(org.gcube.common.core.types.DescriptiveProperty inputs)
Adds one or more sample inputs for the task.

Subclasses typically add sample inputs in GCUBEPluginContext.initialise(GCUBEService).

Parameters:
inputs - the sample inputs.

addSampleOutput

protected void addSampleOutput(org.gcube.common.core.types.DescriptiveProperty... outputs)
Adds one ore more sample output for the task.

Subclasses typically add sample output in GCUBEPluginContext.initialise(GCUBEService).

Parameters:
outputs - the sample outputs.

getTimeToLive

public int getTimeToLive()
Returns the time-to-live for completed or failed task, in minutes.@return the time-to-live.



Copyright © 2013. All Rights Reserved.