Class OfficeMetaDataImpl
java.lang.Object
net.officefloor.frame.impl.execute.office.OfficeMetaDataImpl
- All Implemented Interfaces:
OfficeMetaData
OfficeMetaData implementation.- Author:
- Daniel Sagenschneider
-
Constructor Summary
ConstructorsConstructorDescriptionOfficeMetaDataImpl(String officeName, OfficeManagerHirer officeManagerHirer, MonitorClock monitorClock, FunctionLoop functionLoop, ThreadLocalAwareExecutor threadLocalAwareExecutor, Executive executive, ManagedExecutionFactory managedExecutionFactory, ManagedFunctionMetaData<?, ?>[] functionMetaDatas, ManagedFunctionLocator functionLocator, ProcessMetaData processMetaData, ManagedFunctionMetaData<?, ?> stateKeepAliveFunctionMetaData, Map<String, ManagedFunctionMetaData<?, ?>> loadObjectMetaDatas, OfficeStartupFunction[] startupFunctions, Profiler profiler) Initiate. -
Method Summary
Modifier and TypeMethodDescriptioncreateProcess(FlowMetaData flowMetaData, Object parameter, FlowCallback callback, ThreadState callbackThreadState) Creates a newProcessState.createProcessIdentifier(ProcessState processState) Creates aProcessIdentifierfor a newProcessState.Creates aStateManager.getExecutor(ProcessIdentifier processIdentifier) Obtains theExecutorfor theProcessState.Obtains theFunctionLoopfor theOffice.Obtains theManagedExecutionFactoryfor thisOffice.Obtains theManagedFunctionLocator.ManagedFunctionMetaData<?,?>[] Obtains theMonitorClockfor theOffice.getOfficeManager(ProcessIdentifier processIdentifier) Obtains theOfficeManagerfor theProcessState.Obtains the name of theOffice.Obtains theProcessMetaDatafor processes within thisOffice.Obtains theOfficeStartupFunctioninstances for thisOffice.invokeProcess(FlowMetaData flowMetaData, Object parameter, long delay, FlowCallback callback, ThreadState callbackThreadState, ManagedObject inputManagedObject, ManagedObjectMetaData<?> inputManagedObjectMetaData, int processBoundIndexForInputManagedObject) Invokes aProcessState.Sets up the defaultOfficeManager.
-
Constructor Details
-
OfficeMetaDataImpl
public OfficeMetaDataImpl(String officeName, OfficeManagerHirer officeManagerHirer, MonitorClock monitorClock, FunctionLoop functionLoop, ThreadLocalAwareExecutor threadLocalAwareExecutor, Executive executive, ManagedExecutionFactory managedExecutionFactory, ManagedFunctionMetaData<?, ?>[] functionMetaDatas, ManagedFunctionLocator functionLocator, ProcessMetaData processMetaData, ManagedFunctionMetaData<?, ?> stateKeepAliveFunctionMetaData, Map<String, ManagedFunctionMetaData<?, ?>> loadObjectMetaDatas, OfficeStartupFunction[] startupFunctions, Profiler profiler) Initiate.- Parameters:
officeName- Name of theOffice.officeManagerHirer-OfficeManagerHirer.monitorClock-MonitorClock.functionLoop-FunctionLoop.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 Details
-
getOfficeName
Description copied from interface:OfficeMetaDataObtains the name of theOffice.- Specified by:
getOfficeNamein interfaceOfficeMetaData- Returns:
- Name of the
Office.
-
createProcessIdentifier
Description copied from interface:OfficeMetaDataCreates aProcessIdentifierfor a newProcessState.- Specified by:
createProcessIdentifierin interfaceOfficeMetaData- Parameters:
processState- NewProcessState.- Returns:
- New
ProcessIdentifier.
-
getOfficeManager
Description copied from interface:OfficeMetaDataObtains theOfficeManagerfor theProcessState.- Specified by:
getOfficeManagerin interfaceOfficeMetaData- Parameters:
processIdentifier-ProcessIdentifierof theProcessState.- Returns:
OfficeManagerof theOffice.
-
getExecutor
Description copied from interface:OfficeMetaDataObtains theExecutorfor theProcessState.- Specified by:
getExecutorin interfaceOfficeMetaData- Parameters:
processIdentifier-ProcessIdentifierof theProcessState.- Returns:
Executorfor theProcessState.
-
getMonitorClock
Description copied from interface:OfficeMetaDataObtains theMonitorClockfor theOffice.- Specified by:
getMonitorClockin interfaceOfficeMetaData- Returns:
MonitorClockfor theOffice.
-
getFunctionLoop
Description copied from interface:OfficeMetaDataObtains theFunctionLoopfor theOffice.- Specified by:
getFunctionLoopin interfaceOfficeMetaData- Returns:
FunctionLoopfor theOffice.
-
getProcessMetaData
Description copied from interface:OfficeMetaDataObtains theProcessMetaDatafor processes within thisOffice.- Specified by:
getProcessMetaDatain interfaceOfficeMetaData- Returns:
ProcessMetaDatafor processes within thisOffice.
-
getManagedFunctionMetaData
Description copied from interface:OfficeMetaData- Specified by:
getManagedFunctionMetaDatain interfaceOfficeMetaData- Returns:
ManagedFunctionMetaDatainstances of thisOffice.
-
getManagedFunctionLocator
Description copied from interface:OfficeMetaDataObtains theManagedFunctionLocator.- Specified by:
getManagedFunctionLocatorin interfaceOfficeMetaData- Returns:
ManagedFunctionLocator.
-
getStartupFunctions
Description copied from interface:OfficeMetaDataObtains theOfficeStartupFunctioninstances for thisOffice.- Specified by:
getStartupFunctionsin interfaceOfficeMetaData- Returns:
OfficeStartupFunctioninstances for thisOffice.
-
getExecutive
Description copied from interface:OfficeMetaData- Specified by:
getExecutivein interfaceOfficeMetaData- Returns:
Executivefor thisOffice.
-
getManagedExecutionFactory
Description copied from interface:OfficeMetaDataObtains theManagedExecutionFactoryfor thisOffice.- Specified by:
getManagedExecutionFactoryin interfaceOfficeMetaData- Returns:
ManagedExecutionFactoryfor thisOffice.
-
createProcess
public FunctionState createProcess(FlowMetaData flowMetaData, 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.
-
setupDefaultOfficeManager
Description copied from interface:OfficeMetaDataSets up the defaultOfficeManager.- Specified by:
setupDefaultOfficeManagerin interfaceOfficeMetaData- Returns:
- Default
OfficeManager.
-
createStateManager
Description copied from interface:OfficeMetaDataCreates aStateManager.- Specified by:
createStateManagerin interfaceOfficeMetaData- Returns:
Statement.
-
invokeProcess
public ProcessManager invokeProcess(FlowMetaData flowMetaData, 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.
-