Class ManagedObjectExecutorFactory<F extends java.lang.Enum<F>>
- java.lang.Object
-
- net.officefloor.frame.api.managedobject.executor.ManagedObjectExecutorFactory<F>
-
- Type Parameters:
F- FlowEnum.
public class ManagedObjectExecutorFactory<F extends java.lang.Enum<F>> extends java.lang.ObjectConvenience class to wrap the
ManagedObjectServiceContextas anExecutor.This allows the
ManagedObjectSourceto integrate with libraries requiring anExecutor. An example being SSL requiring to runRunnabletasks.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectExecutorFactory(AbstractAsyncManagedObjectSource.MetaDataContext<?,F> context, F flowKey, java.lang.String teamName)Instantiate for invoking byFlowkey.ManagedObjectExecutorFactory(AbstractAsyncManagedObjectSource.MetaDataContext<?,Indexed> context, java.lang.String teamName)Instantiate for invoking by next index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.concurrent.ExecutorcreateExecutor(ManagedObjectServiceContext<F> context, ManagedObject managedObject)Creates theExecutor.
-
-
-
Constructor Detail
-
ManagedObjectExecutorFactory
public ManagedObjectExecutorFactory(AbstractAsyncManagedObjectSource.MetaDataContext<?,F> context, F flowKey, java.lang.String teamName)
Instantiate for invoking byFlowkey.- Parameters:
context-AbstractAsyncManagedObjectSource.MetaDataContextfor theManagedObjectSource.flowKey-Flowkey to register theFlow.teamName- Name of theTeam.
-
ManagedObjectExecutorFactory
public ManagedObjectExecutorFactory(AbstractAsyncManagedObjectSource.MetaDataContext<?,Indexed> context, java.lang.String teamName)
Instantiate for invoking by next index.- Parameters:
context-AbstractAsyncManagedObjectSource.MetaDataContextfor theManagedObjectSource.teamName- Name of theTeam.
-
-
Method Detail
-
createExecutor
public java.util.concurrent.Executor createExecutor(ManagedObjectServiceContext<F> context, ManagedObject managedObject)
Creates theExecutor.- Parameters:
context-ManagedObjectServiceContextfor theManagedObjectSource.managedObject-ManagedObjectused for allRunnableexecutions.- Returns:
Executorthat delegates to theManagedObjectExecuteContextto execute theRunnableinstances.
-
-