Package net.officefloor.frame.util
Class ExecutiveSourceStandAlone
- java.lang.Object
-
- net.officefloor.frame.util.ExecutiveSourceStandAlone
-
public class ExecutiveSourceStandAlone extends java.lang.Object
LoadsExecutiveSource
for 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 void
addProperty(java.lang.String name, java.lang.String value)
Adds a property for theManagedObjectSource
.void
addThreadCompletionListener(ThreadCompletionListener threadCompletionListener)
Adds aThreadCompletionListener
.<XS extends ExecutiveSource>
ExecutiveloadExecutive(java.lang.Class<XS> executiveSourceClass)
Creates theExecutive
.Executive
loadExecutive(ExecutiveSource executiveSource)
Returns aExecutive
from the loadedExecutiveSource
.void
setClockFactory(ClockFactory clockFactory)
Specifies theClockFactory
.void
setThreadDecorator(java.util.function.Consumer<java.lang.Thread> decorator)
Specifies the decorator of theThread
instances 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 theThread
instances created by theExecutiveSourceContext
.- Parameters:
decorator
-Thread
decorator.
-
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
-ExecutiveSource
type.- 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 aExecutive
from the loadedExecutiveSource
.- Parameters:
executiveSource
-ExecutiveSource
.- Returns:
- Loaded
Executive
. - Throws:
java.lang.Exception
- If fails to initialiseExecutiveSource
.
-
-