- java.lang.Object
-
- org.praxislive.base.AbstractRoot
-
- org.praxislive.hub.BasicCoreRoot
-
- All Implemented Interfaces:
Lookup.Provider
,Root
public class BasicCoreRoot extends AbstractRoot
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.praxislive.base.AbstractRoot
AbstractRoot.Controller, AbstractRoot.Delegate, AbstractRoot.DelegateConfiguration, AbstractRoot.State
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BasicCoreRoot(Hub.Accessor hubAccess, List<Root> exts)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activating()
Hook called during activation of this Root, asynchronously after a call toAbstractRoot.Controller.start(java.util.concurrent.ThreadFactory)
.protected void
buildControlMap(Map<String,Control> ctrls)
protected int
exitValue()
static Hub.CoreRootFactory
factory()
protected void
forceTermination()
protected Hub.Accessor
getHubAccessor()
AbstractRoot.Controller
initialize(String id, RootHub hub)
Method used by the RootHub to initialize the Root and obtain a Controller.protected void
installExtensions()
protected void
installRoot(String id, String type, Root root)
protected void
processCall(Call call, PacketRouter router)
Method called to handle every receivedCall
.protected void
registerServices()
protected void
startRoot(String id, String type, Root.Controller ctrl)
protected void
terminating()
Hook called during termination of this Root, asynchronously after a call toAbstractRoot.Controller.shutdown()
or other cause of termination.protected void
uninstallRoot(String id)
-
Methods inherited from class org.praxislive.base.AbstractRoot
attachDelegate, createContext, createController, createRouter, delegateConfig, detachDelegate, findService, getAddress, getExecutionContext, getLookup, getRootHub, getRouter, getState, interrupt, invokeLater, setIdle, setRunning, starting, stopping, update
-
-
-
-
Constructor Detail
-
BasicCoreRoot
protected BasicCoreRoot(Hub.Accessor hubAccess, List<Root> exts)
-
-
Method Detail
-
initialize
public AbstractRoot.Controller initialize(String id, RootHub hub)
Description copied from interface:Root
Method used by the RootHub to initialize the Root and obtain a Controller. Root implementations will ensure this method can only be invoked once.- Specified by:
initialize
in interfaceRoot
- Overrides:
initialize
in classAbstractRoot
- Parameters:
id
- the unique ID of this Roothub
- the RootHub the Root resides within- Returns:
- Controller for use by the RootHub instance
-
activating
protected void activating()
Description copied from class:AbstractRoot
Hook called during activation of this Root, asynchronously after a call toAbstractRoot.Controller.start(java.util.concurrent.ThreadFactory)
. The default implementation does nothing.- Overrides:
activating
in classAbstractRoot
-
terminating
protected void terminating()
Description copied from class:AbstractRoot
Hook called during termination of this Root, asynchronously after a call toAbstractRoot.Controller.shutdown()
or other cause of termination. The default implementation does nothing.- Overrides:
terminating
in classAbstractRoot
-
forceTermination
protected void forceTermination()
-
exitValue
protected int exitValue()
-
processCall
protected void processCall(Call call, PacketRouter router)
Description copied from class:AbstractRoot
Method called to handle every receivedCall
. The provided router should be used for all ongoing or return calls.- Specified by:
processCall
in classAbstractRoot
-
registerServices
protected void registerServices()
-
installExtensions
protected void installExtensions()
-
installRoot
protected void installRoot(String id, String type, Root root) throws Exception
- Throws:
Exception
-
uninstallRoot
protected void uninstallRoot(String id)
-
startRoot
protected void startRoot(String id, String type, Root.Controller ctrl)
-
getHubAccessor
protected Hub.Accessor getHubAccessor()
-
factory
public static Hub.CoreRootFactory factory()
-
-