public class ParallelNodeDispatcher extends java.lang.Object implements NodeDispatcher
Modifier and Type | Class and Description |
---|---|
static class |
ParallelNodeDispatcher.SetThreadLocalTask
Task to set a threadlocal value given a refid.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NODE_NAME_LOCAL_REF_ID |
static java.lang.String |
NODE_USER_LOCAL_REF_ID |
static java.lang.String |
STATUS_LISTENER_REF_ID |
Constructor and Description |
---|
ParallelNodeDispatcher(Framework framework) |
Modifier and Type | Method and Description |
---|---|
static void |
addNodeContextTasks(INodeEntry nodeentry,
org.apache.tools.ant.Project project,
org.apache.tools.ant.taskdefs.Sequential seq)
Add tasks to the Sequential to set threadlocal values for the node name and username
|
static void |
configureNodeContextThreadLocalsForProject(org.apache.tools.ant.Project project)
Adds InheritableNodeLocal references to the Project for use by the node context tasks
|
DispatcherResult |
dispatch(StepExecutionContext context,
Dispatchable item) |
DispatcherResult |
dispatch(StepExecutionContext context,
NodeStepExecutionItem item)
XXX: perhaps remove this in lieu of other interface
|
DispatcherResult |
dispatch(StepExecutionContext context,
NodeStepExecutionItem item,
Dispatchable toDispatch) |
static java.lang.String |
getThreadLocalForProject(java.lang.String nodeNameLocalRefId,
org.apache.tools.ant.Project project)
Extract the threadlocal stored as a reference in the project, and return the string value or null.
|
public static final java.lang.String STATUS_LISTENER_REF_ID
public static final java.lang.String NODE_NAME_LOCAL_REF_ID
public static final java.lang.String NODE_USER_LOCAL_REF_ID
public ParallelNodeDispatcher(Framework framework)
public DispatcherResult dispatch(StepExecutionContext context, NodeStepExecutionItem item) throws DispatcherException
NodeDispatcher
dispatch
in interface NodeDispatcher
DispatcherException
public DispatcherResult dispatch(StepExecutionContext context, Dispatchable item) throws DispatcherException
dispatch
in interface NodeDispatcher
DispatcherException
public DispatcherResult dispatch(StepExecutionContext context, NodeStepExecutionItem item, Dispatchable toDispatch) throws DispatcherException
DispatcherException
public static void configureNodeContextThreadLocalsForProject(org.apache.tools.ant.Project project)
project
- the projectpublic static java.lang.String getThreadLocalForProject(java.lang.String nodeNameLocalRefId, org.apache.tools.ant.Project project)
nodeNameLocalRefId
- refid for the thread local variableproject
- Projectpublic static void addNodeContextTasks(INodeEntry nodeentry, org.apache.tools.ant.Project project, org.apache.tools.ant.taskdefs.Sequential seq)
nodeentry
- node entryproject
- ant Projectseq
- Sequential