@PublicAPI public class JavaTask extends Task
JavaExecutable and be integrated in a
TaskFlowJob.
A java task includes an JavaExecutable that can be set
as a .class file or instance.
It also provides method to personalize it.
| Modifier and Type | Field and Description |
|---|---|
static String |
ARGS_FIELD_NAME
For internal use: name of the field that stores task arguments
|
protected String |
executableClassName
Classname of the executable
|
cScript, description, flowBlock, flowScript, fork, forkEnvironment, inputFiles, name, outputFiles, parallelEnvironment, postScript, preciousLogs, preciousResult, preScript, runAsMe, sScripts, tag, variables, wallTimeDEFAULT_TASK_RETRY_DELAY, GENERIC_INFO_START_AT_KEY, genericInformation, maxNumberOfExecution, onTaskError, restartTaskOnError, taskRetryDelay, unresolvedGenericInformation| Constructor and Description |
|---|
JavaTask()
Empty constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArgument(String name,
Serializable value)
Add an argument to the list of arguments.
|
String |
display() |
Serializable |
getArgument(String name)
Return a copy of the value of the specified argument.
|
Map<String,Serializable> |
getArguments()
Return an unmodifiable copy of all the task arguments as a hash map.
|
String |
getExecutableClassName()
To get the executable task classname.
|
HashMap<String,byte[]> |
getSerializedArguments() |
Serializable |
removeArgument(String name)
Remove the specified argument from the argument map.
|
void |
setExecutableClassName(String executableClassName)
To set the executable task class name.
|
addDependence, addDependences, addInputFiles, addInputFiles, addOutputFiles, addOutputFiles, addSelectionScript, getCleaningScript, getDependencesList, getDescription, getFlowBlock, getFlowScript, getForkEnvironment, getInputFilesList, getName, getNumberOfNodesNeeded, getOutputFilesList, getParallelEnvironment, getPostScript, getPreScript, getSelectionScripts, getTag, getUnresolvedVariables, getVariables, getVariablesOverriden, getWallTime, getWorkingDir, isFork, isParallel, isPreciousLogs, isPreciousResult, isRunAsMe, isWallTimeSet, setCleaningScript, setDescription, setFlowBlock, setFlowScript, setFork, setForkEnvironment, setName, setNumberOfNeededNodes, setParallelEnvironment, setPostScript, setPreciousLogs, setPreciousResult, setPreScript, setRunAsMe, setSelectionScript, setSelectionScripts, setTag, setUnresolvedVariables, setVariables, setWallTime, toString, verifyVariableMapaddGenericInformation, addGenericInformations, applyReplacementsOnGenericInformation, getGenericInformation, getMaxNumberOfExecution, getMaxNumberOfExecutionProperty, getOnTaskErrorProperty, getRestartTaskOnError, getRestartTaskOnErrorProperty, getTaskRetryDelay, getTaskRetryDelayProperty, getUnresolvedGenericInformation, setGenericInformation, setMaxNumberOfExecution, setOnTaskError, setRestartTaskOnError, setTaskRetryDelay, setUnresolvedGenericInformationprotected String executableClassName
public static final String ARGS_FIELD_NAME
public String getExecutableClassName()
public void setExecutableClassName(String executableClassName)
JavaExecutable.executableClassName - the task Class to set.public Map<String,Serializable> getArguments() throws IOException, ClassNotFoundException
IOException - if the copy of the value cannot be performed.ClassNotFoundException - if the value's class cannot be loaded.public void addArgument(String name, Serializable value)
name - the name of the argument to add.value - the associated value to add.IllegalArgumentException - if the value cannot be serialized and stored in the task.public Serializable getArgument(String name) throws IOException, ClassNotFoundException
name - the name of the specified argument.IOException - if the copy of the value cannot be performed.ClassNotFoundException - if the value's class cannot be loaded.public Serializable removeArgument(String name) throws IOException, ClassNotFoundException
name - the name of the specified argument.IOException - if the copy of the value cannot be performed.ClassNotFoundException - if the value's class cannot be loaded.