Package net.officefloor.frame.util
Class ExecutiveSourceStandAlone
java.lang.Object
net.officefloor.frame.util.ExecutiveSourceStandAlone
Loads
ExecutiveSource for stand-alone use.- Author:
- Daniel Sagenschneider
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProperty(String name, String value) Adds a property for theManagedObjectSource.voidaddThreadCompletionListener(ThreadCompletionListener threadCompletionListener) Adds aThreadCompletionListener.<XS extends ExecutiveSource>
ExecutiveloadExecutive(Class<XS> executiveSourceClass) Creates theExecutive.loadExecutive(ExecutiveSource executiveSource) Returns aExecutivefrom the loadedExecutiveSource.voidsetClockFactory(ClockFactory clockFactory) Specifies theClockFactory.voidsetThreadDecorator(Consumer<Thread> decorator) Specifies the decorator of theThreadinstances created by theExecutiveSourceContext.
-
Constructor Details
-
ExecutiveSourceStandAlone
public ExecutiveSourceStandAlone()
-
-
Method Details
-
addProperty
Adds a property for theManagedObjectSource.- Parameters:
name- Name of the property.value- Value for the property.
-
setThreadDecorator
Specifies the decorator of theThreadinstances created by theExecutiveSourceContext.- Parameters:
decorator-Threaddecorator.
-
addThreadCompletionListener
Adds aThreadCompletionListener.- Parameters:
threadCompletionListener-ThreadCompletionListener.
-
setClockFactory
Specifies theClockFactory.- Parameters:
clockFactory-ClockFactory.
-
loadExecutive
public <XS extends ExecutiveSource> Executive loadExecutive(Class<XS> executiveSourceClass) throws Exception Creates theExecutive.- Type Parameters:
XS-ExecutiveSourcetype.- Parameters:
executiveSourceClass- Class of theExecutiveSource.- Returns:
- Loaded
Executive. - Throws:
Exception- If fails to initialiseExecutiveSource.
-
loadExecutive
Returns aExecutivefrom the loadedExecutiveSource.- Parameters:
executiveSource-ExecutiveSource.- Returns:
- Loaded
Executive. - Throws:
Exception- If fails to initialiseExecutiveSource.
-