Interface ManagedObjectExecuteContext<F extends java.lang.Enum<F>>
-
public interface ManagedObjectExecuteContext<F extends java.lang.Enum<F>>Context that the
ManagedObjectis to execute within.In invoking processes the following should be taken into account:
- The
Flow(process) will be instigated in a newProcessStatewhich for example will cause newManagedObjectdependencies to be instantiated. - The
ManagedObjectpassed to the invocation will go through a full life-cycle so be careful passing in an existing initialisedManagedObject. For example theAsynchronousContextinstance will be overwritten which will likely cause live-lock as theAsynchronousContext.complete(net.officefloor.frame.api.managedobject.AsynchronousOperation)will notify on the wrongManagedObjectContainer.
- Author:
- Daniel Sagenschneider
- The
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddService(ManagedObjectService<F> service)Adds aManagedObjectService.java.util.concurrent.ThreadFactory[]getExecutionStrategy(int executionStrategyIndex)Obtains anExecutionStrategy.java.util.logging.LoggergetLogger()Obtains theLogger.ManagedObjectStartupProcessinvokeStartupProcess(int flowIndex, java.lang.Object parameter, ManagedObject managedObject, FlowCallback callback)Invokes a start upFlow.ManagedObjectStartupProcessinvokeStartupProcess(F key, java.lang.Object parameter, ManagedObject managedObject, FlowCallback callback)Invokes a start upFlow.
-
-
-
Method Detail
-
getLogger
java.util.logging.Logger getLogger()
Obtains theLogger.- Returns:
Logger.
-
getExecutionStrategy
java.util.concurrent.ThreadFactory[] getExecutionStrategy(int executionStrategyIndex)
Obtains anExecutionStrategy.- Parameters:
executionStrategyIndex- Index of theExecutionStrategy.- Returns:
ThreadFactoryinstances for theExecutionStrategy.
-
invokeStartupProcess
ManagedObjectStartupProcess invokeStartupProcess(F key, java.lang.Object parameter, ManagedObject managedObject, FlowCallback callback) throws java.lang.IllegalArgumentException
Invokes a start upFlow.- Parameters:
key- Key identifying theFlowto instigate.parameter- Parameter to firstManagedFunctionof theFlow.managedObject-ManagedObjectfor theProcessStateof theFlow.callback-FlowCallbackon completion of theFlow.- Returns:
ManagedObjectStartupProcess.- Throws:
java.lang.IllegalArgumentException- If- unknown
Flowkey - parameter is incorrect type
- no
ManagedObjectis supplied
- unknown
-
invokeStartupProcess
ManagedObjectStartupProcess invokeStartupProcess(int flowIndex, java.lang.Object parameter, ManagedObject managedObject, FlowCallback callback) throws java.lang.IllegalArgumentException
Invokes a start upFlow.- Parameters:
flowIndex- Index identifying theFlowto instigate.parameter- Parameter to firstManagedFunctionof theFlow.managedObject-ManagedObjectfor theProcessStateof theFlow.callback-FlowCallbackon completion of theFlow.- Returns:
ManagedObjectStartupProcess.- Throws:
java.lang.IllegalArgumentException- If- unknown
Flowkey - parameter is incorrect type
- no
ManagedObjectis supplied
- unknown
-
addService
void addService(ManagedObjectService<F> service)
Adds aManagedObjectService.- Parameters:
service-ManagedObjectService.
-
-