Class Hub.Builder

java.lang.Object
org.praxislive.hub.Hub.Builder
Enclosing class:
Hub

public static class Hub.Builder extends Object
A builder for Hubs.
  • Method Details

    • setCoreRootFactory

      public Hub.Builder setCoreRootFactory(Hub.CoreRootFactory coreRootFactory)
      Configure the Hub.CoreRootFactory to use to build the core root. The default configuration will create a BasicCoreRoot.
      Parameters:
      coreRootFactory - factory for core root
      Returns:
      this
    • addExtension

      public Hub.Builder addExtension(Root extension)
      Add a root to install as an extension. If the extension implements RootHub.ServiceProvider then 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

      public Hub.Builder extendLookup(Object obj)
      Extend the hub lookup with the provided object.
      Parameters:
      obj - object to add
      Returns:
      this
    • build

      public Hub build()
      Build the hub.
      Returns:
      hub