public abstract class ExecutorPluginContext
extends org.gcube.common.core.plugins.GCUBEPluginContext
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()).
| Modifier and Type | Field and Description |
|---|---|
static int |
TIME_TO_LIVE
Default task expiration delay.
|
| Constructor and Description |
|---|
ExecutorPluginContext() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final int TIME_TO_LIVE
public org.gcube.vremanagement.executor.stubs.TaskDescription getDescription()
public void setTaskDescription(org.gcube.vremanagement.executor.stubs.TaskDescription description)
public abstract Class<? extends ExecutorTask> getTaskClass()
public List<org.gcube.common.core.types.DescriptiveProperty> getSampleInputs()
public List<org.gcube.common.core.types.DescriptiveProperty> getSampleOutputs()
protected void addSampleInput(org.gcube.common.core.types.DescriptiveProperty inputs)
Subclasses typically add sample inputs in GCUBEPluginContext.initialise(GCUBEService).
inputs - the sample inputs.protected void addSampleOutput(org.gcube.common.core.types.DescriptiveProperty... outputs)
Subclasses typically add sample output in GCUBEPluginContext.initialise(GCUBEService).
outputs - the sample outputs.public int getTimeToLive()
Copyright © 2015. All Rights Reserved.