java.lang.Object
org.praxislive.hub.net.NetworkCoreFactory
- All Implemented Interfaces:
Hub.CoreRootFactory
A CoreRootFactory supporting a tree of networked roots. Use
builder() to create.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder for NetworkCoreFactory.static final classInformation about the launched network hub. -
Method Summary
Modifier and TypeMethodDescriptionGetNetworkCoreFactory.Infofor the started core root.static NetworkCoreFactory.Builderbuilder()Create a NetworkCoreFactory builder.createCoreRoot(Hub.Accessor accessor, List<Root> extensions) Create a core root implementation with the provided RootHub accessor and extensions.extendLookup(Lookup lookup) Provide the option for the factory to extend or alter the hub lookup.
-
Method Details
-
createCoreRoot
Description copied from interface:Hub.CoreRootFactoryCreate a core root implementation with the provided RootHub accessor and extensions. The return type of this method will usually be a subclass ofBasicCoreRoot.- Specified by:
createCoreRootin interfaceHub.CoreRootFactory- Parameters:
accessor- private access to control the RootHubextensions- extensions to install- Returns:
- core root implementation
-
extendLookup
Description copied from interface:Hub.CoreRootFactoryProvide the option for the factory to extend or alter the hub lookup. This should usually be done by passing the provided lookup in as parent toLookup.of(org.praxislive.core.Lookup, java.lang.Object...). The default implementation returns the provided lookup unchanged.- Specified by:
extendLookupin interfaceHub.CoreRootFactory- Parameters:
lookup- existing lookup- Returns:
- extended lookup
-
awaitInfo
public NetworkCoreFactory.Info awaitInfo(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException GetNetworkCoreFactory.Infofor the started core root. If the server is enabled, this will block until a network connection is established and the socket address and port is available.- Parameters:
timeout- the maximum time to waitunit- the unit of timeout- Returns:
- info
- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
builder
Create a NetworkCoreFactory builder.- Returns:
- builder
-