public class WorkManagerImpl extends Object implements WorkManager
WorkManager
.Constructor and Description |
---|
WorkManagerImpl(WorkMetaData<?> workMetaData,
OfficeMetaData officeMetaData,
ProcessTicker processTicker)
Initiate.
|
Modifier and Type | Method and Description |
---|---|
TaskManager |
getTaskManager(String taskName)
Obtains the
TaskManager for the named Task . |
String[] |
getTaskNames()
Obtains the names of the
TaskManager instances managed by this
WorkManager . |
Class<?> |
getWorkParameterType()
Obtains the parameter type for invoking the
Work . |
ProcessFuture |
invokeWork(Object parameter)
|
public WorkManagerImpl(WorkMetaData<?> workMetaData, OfficeMetaData officeMetaData, ProcessTicker processTicker)
workMetaData
- WorkMetaData
.officeMetaData
- OfficeMetaData
.processTicker
- ProcessTicker
.public Class<?> getWorkParameterType() throws NoInitialTaskException
WorkManager
Work
.getWorkParameterType
in interface WorkManager
Work
. Will be
null
if no parameter to the Work
.NoInitialTaskException
- If Work
does not have an initial Task
.public ProcessFuture invokeWork(Object parameter) throws NoInitialTaskException, InvalidParameterTypeException
WorkManager
invokeWork
in interface WorkManager
parameter
- Parameter for the first Task
of the Work
.ProcessFuture
to indicate when the ProcessState
executing the Work
has completed.NoInitialTaskException
- If Work
does not have an initial Task
.InvalidParameterTypeException
- Should the parameter be of incorrect type for the initial
Task
.public String[] getTaskNames()
WorkManager
Obtains the names of the TaskManager
instances managed by this
WorkManager
.
This allows to dynamically manage this WorkManager
.
getTaskNames
in interface WorkManager
TaskManager
instances managed by this
WorkManager
.public TaskManager getTaskManager(String taskName) throws UnknownTaskException
WorkManager
TaskManager
for the named Task
.getTaskManager
in interface WorkManager
taskName
- Name of the Task
.TaskManager
for the named Task
.UnknownTaskException
- If unknown Task
name.Copyright © 2005–2016. All rights reserved.