@NotThreadSafe public static final class ImmutableServerConfiguration.Builder extends Object
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableServerConfiguration |
build()
Builds a new
ImmutableServerConfiguration. |
ImmutableServerConfiguration.Builder |
from(ServerConfiguration instance)
Fill a builder with attribute values from the provided
ServerConfiguration instance. |
ImmutableServerConfiguration.Builder |
serverHostname(String serverHostname)
Initializes the value for the
serverHostname attribute. |
ImmutableServerConfiguration.Builder |
serverPort(int serverPort)
Initializes the value for the
serverPort attribute. |
ImmutableServerConfiguration.Builder |
uriScheme(String uriScheme)
Initializes the value for the
uriScheme attribute. |
public final ImmutableServerConfiguration.Builder from(ServerConfiguration instance)
ServerConfiguration instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableServerConfiguration.Builder uriScheme(String uriScheme)
uriScheme attribute.
If not set, this attribute will have a default value as returned by the initializer of uriScheme.
uriScheme - The value for uriSchemethis builder for use in a chained invocationpublic final ImmutableServerConfiguration.Builder serverHostname(String serverHostname)
serverHostname attribute.
If not set, this attribute will have a default value as returned by the initializer of serverHostname.
serverHostname - The value for serverHostnamethis builder for use in a chained invocationpublic final ImmutableServerConfiguration.Builder serverPort(int serverPort)
serverPort attribute.
If not set, this attribute will have a default value as returned by the initializer of serverPort.
serverPort - The value for serverPortthis builder for use in a chained invocationpublic ImmutableServerConfiguration build()
ImmutableServerConfiguration.IllegalStateException - if any required attributes are missingCopyright © 2010–2018 Justin Searls. All rights reserved.