Interface ServerConfiguration.Builder<B extends ServerConfiguration.Builder<B>>

Type Parameters:
B - the builder type
All Known Subinterfaces:
EntityServerConfiguration.Builder
Enclosing interface:
ServerConfiguration

public static interface ServerConfiguration.Builder<B extends ServerConfiguration.Builder<B>>
A Builder for ServerConfiguration
  • Method Details

    • port

      B port(int port)
      Parameters:
      port - the port on which the server is made available to clients
      Returns:
      this builder instance
      See Also:
    • rmi

      B rmi(boolean rmi)
      Parameters:
      rmi - whether the server participates in RMI; when false it serves only via its auxiliary servers (typically HTTP), exporting no RMI data connection and refusing a remote connect()
      Returns:
      this builder instance
      See Also:
    • registryPort

      B registryPort(int registryPort)
      Parameters:
      registryPort - the port on which to locate the server registry
      Returns:
      this builder instance
      See Also:
    • adminPort

      B adminPort(int adminPort)
      Parameters:
      adminPort - the port on which to make the server admin interface accessible
      Returns:
      this builder instance
    • serverName

      B serverName(Supplier<String> serverName)
      Parameters:
      serverName - the server name supplier, must return a non-empty string
      Returns:
      this builder instance
    • serverName

      B serverName(String serverName)
      Parameters:
      serverName - the server name
      Returns:
      this builder instance
      Throws:
      IllegalArgumentException - in case serverName is null or empty
    • auxiliaryServerFactories

      B auxiliaryServerFactories(Collection<String> auxiliaryServerFactories)
      Sets the auxiliary server factories, replacing those configured via ServerConfiguration.AUXILIARY_SERVER_FACTORIES or set before.
      Parameters:
      auxiliaryServerFactories - the class names of auxiliary server factories, providing the servers to run alongside this server
      Returns:
      this builder instance
      See Also:
    • auxiliaryServerFactory

      B auxiliaryServerFactory(String auxiliaryServerFactory)
      Adds an auxiliary server factory, to those configured via ServerConfiguration.AUXILIARY_SERVER_FACTORIES or set before.
      Parameters:
      auxiliaryServerFactory - the class name of an auxiliary server factory, providing a server to run alongside this server
      Returns:
      this builder instance
      See Also:
    • authenticator

      B authenticator(String authenticatorClass)
      Specifies an Authenticator class name, instantiated on server start, must have a parameterless constructor
      Parameters:
      authenticatorClass - the authenticator class name
      Returns:
      this builder instance
    • authenticatorExemptions

      B authenticatorExemptions(Collection<String> clientTypes)
      Sets the client types exempt from authentication, replacing those configured via ServerConfiguration.AUTHENTICATOR_EXEMPTIONS or set before.
      Parameters:
      clientTypes - client types exempt from authentication by an Authenticator
      Returns:
      this builder instance
      See Also:
    • authenticatorExemption

      B authenticatorExemption(String clientType)
      Adds a client type exempt from authentication, to those configured via ServerConfiguration.AUTHENTICATOR_EXEMPTIONS or set before.
      Parameters:
      clientType - a client type exempt from authentication by an Authenticator
      Returns:
      this builder instance
      See Also:
    • sslEnabled

      B sslEnabled(boolean sslEnabled)
      When set to true this also sets the rmi client/server socket factories, the client socket factory creating its sockets, in the JVM of the client, with Clients.sslContext(), the server socket factory serving with the keystore specified by ServerConfiguration.KEYSTORE or ServerConfiguration.CLASSPATH_KEYSTORE as the configuration is built, read when the server starts.
      Parameters:
      sslEnabled - if true then ssl is enabled
      Returns:
      this builder instance
    • objectInputFilterFactory

      B objectInputFilterFactory(@Nullable String objectInputFilterFactory)
      Parameters:
      objectInputFilterFactory - the object input filter factory class name
      Returns:
      this builder instance
    • objectInputFilterFactoryRequired

      B objectInputFilterFactoryRequired(boolean objectInputFilterFactoryRequired)
      Specifies whether an ObjectInputFilterFactory is required for the server to run.
      Parameters:
      objectInputFilterFactoryRequired - true if an ObjectInputFilterFactory is required for the server to run
      Returns:
      this builder instance
    • connectionMaintenanceInterval

      B connectionMaintenanceInterval(int connectionMaintenanceInterval)
      Parameters:
      connectionMaintenanceInterval - the interval between server connection maintenance runs, in milliseconds.
      Returns:
      this builder instance
    • connectionLimit

      B connectionLimit(int connectionLimit)
      Parameters:
      connectionLimit - the maximum number of concurrent connections, -1 for no limit
      Returns:
      this builder instance
    • systemProperties

      B systemProperties(boolean systemProperties)
      Parameters:
      systemProperties - specifies whether the server should provide its system properties via the admin interface
      Returns:
      this builder instance
      See Also:
    • build

      Returns:
      a new ServerConfiguration instance based on this builder