Package com.ibm.dbb.task.framework
Class Orchestrator.Executor
- java.lang.Object
-
- com.ibm.dbb.task.framework.Orchestrator.Executor
-
- Enclosing class:
- Orchestrator
public static class Orchestrator.Executor extends java.lang.Object
Used to load and cache AbstractLoader instances to be used as executors for actions. AbstractLoader instances must be concrete and determine any customizations applied to the script.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIG_KEY
static java.lang.String
CONTEXT_KEY
-
Constructor Summary
Constructors Constructor Description Executor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
executeTask(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input)
java.lang.Class<?>
loadClass(java.lang.String className)
java.lang.Class<?>
loadClass(java.lang.String className, boolean staticLoad)
java.lang.Class<?>
loadScript(java.lang.String executor, java.io.File taskFile)
Loads a script using an executor, loading the executor from file or package if it is not already cached.java.lang.Object
runClass(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input)
Executes the input compiled groovy or java task.java.lang.Object
runScript(com.ibm.dbb.task.configuration.TaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input)
void
validateTaskSource(com.ibm.dbb.task.configuration.TaskConfiguration task, AbstractVariables variables, java.lang.String taskName)
-
-
-
Field Detail
-
CONTEXT_KEY
public static final java.lang.String CONTEXT_KEY
- See Also:
- Constant Field Values
-
CONFIG_KEY
public static final java.lang.String CONFIG_KEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Executor
public Executor() throws ClassSourceException, BuildException
- Throws:
ClassSourceException
BuildException
-
-
Method Detail
-
executeTask
public java.lang.Object executeTask(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input) throws java.lang.Exception
- Throws:
java.lang.Exception
-
runClass
public java.lang.Object runClass(com.ibm.dbb.task.configuration.AbstractTaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input) throws java.lang.Exception
Executes the input compiled groovy or java task.- Parameters:
executor
- The executor package name or groovy file to useactionFile
- The groovy script to execute as an actioninput
- the input to the action script, placed into the argMap binding of the groovy script- Returns:
- the return from the action script
- Throws:
java.lang.Exception
-
runScript
public java.lang.Object runScript(com.ibm.dbb.task.configuration.TaskConfiguration task, java.util.Map<java.lang.String,java.lang.Object> input) throws java.lang.Exception
- Throws:
java.lang.Exception
-
loadScript
public java.lang.Class<?> loadScript(java.lang.String executor, java.io.File taskFile) throws ClassSourceException, BuildException
Loads a script using an executor, loading the executor from file or package if it is not already cached.- Parameters:
executor
- The executor package name or groovy file to usetaskFile
- The groovy script to load as a task- Returns:
- the class of the loaded script
- Throws:
BuildException
ClassSourceException
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
loadClass
public java.lang.Class<?> loadClass(java.lang.String className, boolean staticLoad) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
validateTaskSource
public void validateTaskSource(com.ibm.dbb.task.configuration.TaskConfiguration task, AbstractVariables variables, java.lang.String taskName) throws ClassSourceException, BuildException
- Throws:
ClassSourceException
BuildException
-
-