net.officefloor.frame.api.manage
Interface WorkManager

All Known Implementing Classes:
WorkManagerImpl

public interface WorkManager

Interface to manage a particular Work.

Author:
Daniel Sagenschneider

Method Summary
 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)
          Invokes a new instance of Work which is done within the Office.
 

Method Detail

getWorkParameterType

Class<?> getWorkParameterType()
                              throws NoInitialTaskException
Obtains the parameter type for invoking the Work.

Returns:
Parameter type for invoking the Work. Will be null if no parameter to the Work.
Throws:
NoInitialTaskException - If Work does not have an initial Task.

invokeWork

ProcessFuture invokeWork(Object parameter)
                         throws NoInitialTaskException,
                                InvalidParameterTypeException
Invokes a new instance of Work which is done within the Office.

Parameters:
parameter - Parameter for the first Task of the Work.
Returns:
ProcessFuture to indicate when the ProcessState executing the Work has completed.
Throws:
NoInitialTaskException - If Work does not have an initial Task.
InvalidParameterTypeException - Should the parameter be of incorrect type for the initial Task.

getTaskNames

String[] getTaskNames()

Obtains the names of the TaskManager instances managed by this WorkManager.

This allows to dynamically manage this WorkManager.

Returns:
Names of the TaskManager instances managed by this WorkManager.

getTaskManager

TaskManager getTaskManager(String taskName)
                           throws UnknownTaskException
Obtains the TaskManager for the named Task.

Parameters:
name - Name of the Task.
Returns:
TaskManager for the named Task.
Throws:
UnknownTaskException - If unknown Task name.


Copyright © 2005-2013. All Rights Reserved.