java.lang.Object
org.praxislive.hub.Hub.Builder
- Enclosing class:
Hub
A builder for Hubs.
-
Method Summary
Modifier and TypeMethodDescriptionaddExtension(org.praxislive.core.Root extension) Add a root to install as an extension.build()Build the hub.extendLookup(Object obj) Extend the hub lookup with the provided object.setCoreRootFactory(Hub.CoreRootFactory coreRootFactory) Configure theHub.CoreRootFactoryto use to build the core root.
-
Method Details
-
setCoreRootFactory
Configure theHub.CoreRootFactoryto use to build the core root. The default configuration will create aBasicCoreRoot.- Parameters:
coreRootFactory- factory for core root- Returns:
- this
-
addExtension
Add a root to install as an extension. If the extension implementsRootHub.ServiceProviderthen it will be automatically registered as a provider of those services. Order of extensions is important - later providers will supersede earlier ones.- Parameters:
extension- extension to add- Returns:
- this
-
extendLookup
Extend the hub lookup with the provided object.- Parameters:
obj- object to add- Returns:
- this
-
build
Build the hub.- Returns:
- hub
-