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.Object
Convenience class to wrap the
ManagedObjectServiceContext
as anExecutor
.This allows the
ManagedObjectSource
to integrate with libraries requiring anExecutor
. An example being SSL requiring to runRunnable
tasks.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description ManagedObjectExecutorFactory(AbstractAsyncManagedObjectSource.MetaDataContext<?,F> context, F flowKey, java.lang.String teamName)
Instantiate for invoking byFlow
key.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.Executor
createExecutor(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 byFlow
key.- Parameters:
context
-AbstractAsyncManagedObjectSource.MetaDataContext
for theManagedObjectSource
.flowKey
-Flow
key 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.MetaDataContext
for theManagedObjectSource
.teamName
- Name of theTeam
.
-
-
Method Detail
-
createExecutor
public java.util.concurrent.Executor createExecutor(ManagedObjectServiceContext<F> context, ManagedObject managedObject)
Creates theExecutor
.- Parameters:
context
-ManagedObjectServiceContext
for theManagedObjectSource
.managedObject
-ManagedObject
used for allRunnable
executions.- Returns:
Executor
that delegates to theManagedObjectExecuteContext
to execute theRunnable
instances.
-
-