public static interface SeBootstrap.Configuration.Builder
SeBootstrap.Configuration
.Modifier and Type | Method and Description |
---|---|
SeBootstrap.Configuration |
build()
Builds a bootstrap configuration instance from the provided property values.
|
<T> SeBootstrap.Configuration.Builder |
from(java.util.function.BiFunction<java.lang.String,java.lang.Class<T>,java.util.Optional<T>> propertiesProvider)
Convenience method for bulk-loading configuration from a property supplier.
|
default SeBootstrap.Configuration.Builder |
from(java.lang.Object externalConfig)
Optional convenience method to bulk-load external configuration.
|
default SeBootstrap.Configuration.Builder |
host(java.lang.String host)
Convenience method to set the
host to be used. |
default SeBootstrap.Configuration.Builder |
port(java.lang.Integer port)
Convenience method to set the
port to be used. |
SeBootstrap.Configuration.Builder |
property(java.lang.String name,
java.lang.Object value)
Sets the property
name to the provided value . |
default SeBootstrap.Configuration.Builder |
protocol(java.lang.String protocol)
Convenience method to set the
protocol to be used. |
default SeBootstrap.Configuration.Builder |
rootPath(java.lang.String rootPath)
Convenience method to set the
rootPath to be used. |
default SeBootstrap.Configuration.Builder |
sslClientAuthentication(SeBootstrap.Configuration.SSLClientAuthentication sslClientAuthentication)
Convenience method to set SSL client authentication policy.
|
default SeBootstrap.Configuration.Builder |
sslContext(javax.net.ssl.SSLContext sslContext)
Convenience method to set the
sslContext to be used. |
SeBootstrap.Configuration build()
SeBootstrap.Configuration
built from provided property values.SeBootstrap.Configuration.Builder property(java.lang.String name, java.lang.Object value)
name
to the provided value
.
This method does not check the validity, type or syntax of the provided value.
name
- name of the parameter to set.value
- value to set, or null
to use the default value.default SeBootstrap.Configuration.Builder protocol(java.lang.String protocol)
protocol
to be used.
Same as if calling property(PROTOCOL, value)
.
protocol
- protocol parameter of this configuration, or null
to use the default value.SeBootstrap.Configuration.PROTOCOL
default SeBootstrap.Configuration.Builder host(java.lang.String host)
host
to be used.
Same as if calling property(HOST, value)
.
host
- host parameter (IP address or hostname) of this configuration, or null
to use the default value.SeBootstrap.Configuration.HOST
default SeBootstrap.Configuration.Builder port(java.lang.Integer port)
port
to be used.
Same as if calling property(PORT, value)
.
port
- port parameter of this configuration, or null
to use the default value.SeBootstrap.Configuration.PORT
default SeBootstrap.Configuration.Builder rootPath(java.lang.String rootPath)
rootPath
to be used.
Same as if calling property(ROOT_PATH, value)
.
rootPath
- rootPath parameter of this configuration, or null
to use the default value.SeBootstrap.Configuration.ROOT_PATH
default SeBootstrap.Configuration.Builder sslContext(javax.net.ssl.SSLContext sslContext)
sslContext
to be used.
Same as if calling property(SSL_CONTEXT, value)
.
sslContext
- sslContext parameter of this configuration, or null
to use the default value.SeBootstrap.Configuration.SSL_CONTEXT
default SeBootstrap.Configuration.Builder sslClientAuthentication(SeBootstrap.Configuration.SSLClientAuthentication sslClientAuthentication)
Same as if calling property(SSL_CLIENT_AUTHENTICATION, value)
.
sslClientAuthentication
- SSL client authentication mode of this configurationSeBootstrap.Configuration.SSL_CLIENT_AUTHENTICATION
<T> SeBootstrap.Configuration.Builder from(java.util.function.BiFunction<java.lang.String,java.lang.Class<T>,java.util.Optional<T>> propertiesProvider)
Implementations ask the passed provider function for the actual values of all their supported properties, before
returning from this configuration method. For each single request the implementation provides the name of the
property and the expected data type of the value. If no such property exists (i. e. either the name is unknown or
misspelled, or the type does not exactly match), the Optional
is empty
.
T
- Type of the requested property value.propertiesProvider
- Retrieval function of externally managed properties. MUST NOT return null
.default SeBootstrap.Configuration.Builder from(java.lang.Object externalConfig)
Implementations are free to support any external configuration mechanics, or none at all. It is completely up to the implementation what set of properties is effectively loaded from the provided external configuration, possibly none at all.
If the passed external configuration mechanics is unsupported, this method MUST simply do nothing.
Portable applications should not call this method, as the outcome is completely implementation-specific.
externalConfig
- source of externally managed properties