java.lang.Object
org.praxislive.hub.net.NetworkCoreFactory.Builder
- Enclosing class:
NetworkCoreFactory
A builder for NetworkCoreFactory.
-
Method Summary
Modifier and TypeMethodDescriptionAllow remote connections.Allow remote connections.build()Build a NetworkCoreFactory based on the builder configuration.childLauncher(ChildLauncher launcher) Provide an implementation ofChildLauncherfor proxies that require to auto-launch a local child process of the current one.Enable a server so that other hubs can connect to and control this one.exposeServices(List<Class<? extends org.praxislive.core.services.Service>> services) List of services that will be exposed to connected hubs.hubConfiguration(HubConfiguration configuration) Provide aHubConfigurationprogrammatically.serverPort(int port) Specify a port for the server.
-
Method Details
-
enableServer
Enable a server so that other hubs can connect to and control this one. By default the port number will be automatic and the socket bound to the loopback address to only allow local connections.- Returns:
- this for chaining
-
serverPort
Specify a port for the server. Only has effect when server is enabled.- Parameters:
port- between 1 and 65535, or 0 for automatic- Returns:
- this for chaining
-
allowRemoteServerConnection
Allow remote connections. Only has effect when server is enabled. Allowing connections from other than localhost may require consideration of security concerns.- Returns:
- this for chaining
-
allowRemoteServerConnection
Allow remote connections. Inbound connections will be matched against the provide CIDR mask if specified. See https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing.Only has effect when server is enabled. Allowing connections from other than localhost may require consideration of security concerns.
- Parameters:
cidr- mask- Returns:
- this for chaining
-
exposeServices
public NetworkCoreFactory.Builder exposeServices(List<Class<? extends org.praxislive.core.services.Service>> services) List of services that will be exposed to connected hubs. Currently only used by child proxies, and will override their default implementation.- Parameters:
services- list of services to expose- Returns:
- this for chaining
-
childLauncher
Provide an implementation ofChildLauncherfor proxies that require to auto-launch a local child process of the current one.- Parameters:
launcher- child launcher implementation- Returns:
- this for chaining
-
hubConfiguration
Provide aHubConfigurationprogrammatically. This will lock the configuration and stop it being configurable via the hub-configure command.- Parameters:
configuration- hub configuration- Returns:
- this for chaining
-
build
Build a NetworkCoreFactory based on the builder configuration.- Returns:
- NetworkCoreFactory
-