Class OfficeMetaDataImpl
- java.lang.Object
-
- net.officefloor.frame.impl.execute.office.OfficeMetaDataImpl
-
- All Implemented Interfaces:
OfficeMetaData
public class OfficeMetaDataImpl extends java.lang.Object implements OfficeMetaData
OfficeMetaDataimplementation.- Author:
- Daniel Sagenschneider
-
-
Constructor Summary
Constructors Constructor Description OfficeMetaDataImpl(java.lang.String officeName, OfficeManager officeManager, MonitorClock monitorClock, java.util.Timer timer, FunctionLoop functionLoop, java.util.concurrent.Executor breakChainExecutor, ThreadLocalAwareExecutor threadLocalAwareExecutor, Executive executive, ManagedExecutionFactory managedExecutionFactory, ManagedFunctionMetaData<?,?>[] functionMetaDatas, ManagedFunctionLocator functionLocator, ProcessMetaData processMetaData, ManagedFunctionMetaData<?,?> stateKeepAliveFunctionMetaData, java.util.Map<java.lang.String,ManagedFunctionMetaData<?,?>> loadObjectMetaDatas, OfficeStartupFunction[] startupFunctions, Profiler profiler)Initiate.
-
Method Summary
-
-
-
Constructor Detail
-
OfficeMetaDataImpl
public OfficeMetaDataImpl(java.lang.String officeName, OfficeManager officeManager, MonitorClock monitorClock, java.util.Timer timer, FunctionLoop functionLoop, java.util.concurrent.Executor breakChainExecutor, ThreadLocalAwareExecutor threadLocalAwareExecutor, Executive executive, ManagedExecutionFactory managedExecutionFactory, ManagedFunctionMetaData<?,?>[] functionMetaDatas, ManagedFunctionLocator functionLocator, ProcessMetaData processMetaData, ManagedFunctionMetaData<?,?> stateKeepAliveFunctionMetaData, java.util.Map<java.lang.String,ManagedFunctionMetaData<?,?>> loadObjectMetaDatas, OfficeStartupFunction[] startupFunctions, Profiler profiler)Initiate.- Parameters:
officeName- Name of theOffice.officeManager-OfficeManager.monitorClock-MonitorClock.timer-Timerfor theOffice.functionLoop-FunctionLoop.breakChainExecutor-Executorto break the thread stack execution chain.threadLocalAwareExecutor-ThreadLocalAwareExecutor.executive-Executive.managedExecutionFactory-ManagedExecutionFactory.functionMetaDatas-ManagedFunctionMetaDataof theManagedFunctionthat can be executed within theOffice.functionLocator-ManagedFunctionLocator.processMetaData-ProcessMetaDataof theProcessStateinstances created within thisOffice.stateKeepAliveFunctionMetaData-ManagedFunctionMetaDataof theManagedFunctionthat keeps theStateManageractive.loadObjectMetaDatas- Load objectManagedFunctionMetaDatabyManagedObjectbound name.startupFunctions-OfficeStartupFunctioninstances.profiler-Profiler.
-
-
Method Detail
-
getOfficeName
public java.lang.String getOfficeName()
Description copied from interface:OfficeMetaDataObtains the name of theOffice.- Specified by:
getOfficeNamein interfaceOfficeMetaData- Returns:
- Name of the
Office.
-
getOfficeManager
public OfficeManager getOfficeManager()
Description copied from interface:OfficeMetaDataObtains theOfficeManagerof theOffice.- Specified by:
getOfficeManagerin interfaceOfficeMetaData- Returns:
OfficeManagerof theOffice.
-
getMonitorClock
public MonitorClock getMonitorClock()
Description copied from interface:OfficeMetaDataObtains theMonitorClockfor theOffice.- Specified by:
getMonitorClockin interfaceOfficeMetaData- Returns:
MonitorClockfor theOffice.
-
getFunctionLoop
public FunctionLoop getFunctionLoop()
Description copied from interface:OfficeMetaDataObtains theFunctionLoopfor theOffice.- Specified by:
getFunctionLoopin interfaceOfficeMetaData- Returns:
FunctionLoopfor theOffice.
-
getProcessMetaData
public ProcessMetaData getProcessMetaData()
Description copied from interface:OfficeMetaDataObtains theProcessMetaDatafor processes within thisOffice.- Specified by:
getProcessMetaDatain interfaceOfficeMetaData- Returns:
ProcessMetaDatafor processes within thisOffice.
-
getManagedFunctionMetaData
public ManagedFunctionMetaData<?,?>[] getManagedFunctionMetaData()
Description copied from interface:OfficeMetaData- Specified by:
getManagedFunctionMetaDatain interfaceOfficeMetaData- Returns:
ManagedFunctionMetaDatainstances of thisOffice.
-
getManagedFunctionLocator
public ManagedFunctionLocator getManagedFunctionLocator()
Description copied from interface:OfficeMetaDataObtains theManagedFunctionLocator.- Specified by:
getManagedFunctionLocatorin interfaceOfficeMetaData- Returns:
ManagedFunctionLocator.
-
getStartupFunctions
public OfficeStartupFunction[] getStartupFunctions()
Description copied from interface:OfficeMetaDataObtains theOfficeStartupFunctioninstances for thisOffice.- Specified by:
getStartupFunctionsin interfaceOfficeMetaData- Returns:
OfficeStartupFunctioninstances for thisOffice.
-
getExecutive
public Executive getExecutive()
Description copied from interface:OfficeMetaData- Specified by:
getExecutivein interfaceOfficeMetaData- Returns:
Executivefor thisOffice.
-
getManagedExecutionFactory
public ManagedExecutionFactory getManagedExecutionFactory()
Description copied from interface:OfficeMetaDataObtains theManagedExecutionFactoryfor thisOffice.- Specified by:
getManagedExecutionFactoryin interfaceOfficeMetaData- Returns:
ManagedExecutionFactoryfor thisOffice.
-
createProcess
public FunctionState createProcess(FlowMetaData flowMetaData, java.lang.Object parameter, FlowCallback callback, ThreadState callbackThreadState)
Description copied from interface:OfficeMetaDataCreates a newProcessState.- Specified by:
createProcessin interfaceOfficeMetaData- Parameters:
flowMetaData-FlowMetaDataof the startingFunctionStatefor theProcessState.parameter- Parameter to the startingFunctionState.callback- OptionalFlowCallbackof theProcessState. May benull.callbackThreadState- OptionalThreadStatefor theFlowCallback. May benull.- Returns:
FunctionStateto start processing theProcessState.
-
createStateManager
public StateManager createStateManager()
Description copied from interface:OfficeMetaDataCreates aStateManager.- Specified by:
createStateManagerin interfaceOfficeMetaData- Returns:
Statement.
-
invokeProcess
public ProcessManager invokeProcess(FlowMetaData flowMetaData, java.lang.Object parameter, long delay, FlowCallback callback, ThreadState callbackThreadState, ManagedObject inputManagedObject, ManagedObjectMetaData<?> inputManagedObjectMetaData, int processBoundIndexForInputManagedObject) throws InvalidParameterTypeException
Description copied from interface:OfficeMetaDataInvokes aProcessState.- Specified by:
invokeProcessin interfaceOfficeMetaData- Parameters:
flowMetaData-FlowMetaDataof the startingFunctionStatefor theProcessState.parameter- Parameter to the startingFunctionState.delay- Millisecond delay in invoking theProcessState. 0 (or negative value) will invoke immediately on the currentThread.callback- OptionalFlowCallbackof theProcessState. May benull.callbackThreadState- OptionalThreadStatefor theFlowCallback. May benull.inputManagedObject-ManagedObjectthat possibly invoked the newProcessState. This may benulland if so the remaining parameters will be ignored.inputManagedObjectMetaData-ManagedObjectMetaDatafor theManagedObjectthat invoked the newProcessState. Should theManagedObjectbe provided this must then also be provided.processBoundIndexForInputManagedObject- Index of theManagedObjectwithin theProcessState. Ignored ifManagedObjectpassed in isnull.- Returns:
ProcessManagerfor the invokedProcessState.- Throws:
InvalidParameterTypeException- Should the type of parameter be invalid for the initialManagedFunction.
-
-