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