Class ImmutableServerConfiguration.Builder

  • Enclosing class:
    ImmutableServerConfiguration

    @NotThreadSafe
    public static final class ImmutableServerConfiguration.Builder
    extends Object
    Builds instances of type ImmutableServerConfiguration. Initialize attributes and then invoke the build() method to create an immutable instance.

    Builder is not thread-safe and generally should not be stored in a field or collection, but instead used immediately to create instances.

    • Method Detail

      • from

        @CanIgnoreReturnValue
        public final ImmutableServerConfiguration.Builder from​(ServerConfiguration instance)
        Fill a builder with attribute values from the provided ServerConfiguration instance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values.
        Parameters:
        instance - The instance from which to copy values
        Returns:
        this builder for use in a chained invocation
      • uriScheme

        @CanIgnoreReturnValue
        public final ImmutableServerConfiguration.Builder uriScheme​(String uriScheme)
        Initializes the value for the uriScheme attribute.

        If not set, this attribute will have a default value as returned by the initializer of uriScheme.

        Parameters:
        uriScheme - The value for uriScheme
        Returns:
        this builder for use in a chained invocation
      • serverHostname

        @CanIgnoreReturnValue
        public final ImmutableServerConfiguration.Builder serverHostname​(String serverHostname)
        Initializes the value for the serverHostname attribute.

        If not set, this attribute will have a default value as returned by the initializer of serverHostname.

        Parameters:
        serverHostname - The value for serverHostname
        Returns:
        this builder for use in a chained invocation
      • serverPort

        @CanIgnoreReturnValue
        public final ImmutableServerConfiguration.Builder serverPort​(int serverPort)
        Initializes the value for the serverPort attribute.

        If not set, this attribute will have a default value as returned by the initializer of serverPort.

        Parameters:
        serverPort - The value for serverPort
        Returns:
        this builder for use in a chained invocation