Interface SeBootstrap.Configuration.Builder
-
- Enclosing interface:
- SeBootstrap.Configuration
public static interface SeBootstrap.Configuration.BuilderBuilder for bootstrapSeBootstrap.Configuration.- Since:
- 3.1
- Author:
- Markus KARG (markus@headcrashing.eu)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SeBootstrap.Configurationbuild()Builds a bootstrap configuration instance from the provided property values.default SeBootstrap.Configuration.Builderfrom(Object externalConfig)Optional convenience method to bulk-load external configuration.<T> SeBootstrap.Configuration.Builderfrom(BiFunction<String,Class<T>,Optional<T>> propertiesProvider)Convenience method for bulk-loading configuration from a property supplier.default SeBootstrap.Configuration.Builderhost(String host)Convenience method to set thehostto be used.default SeBootstrap.Configuration.Builderport(Integer port)Convenience method to set theportto be used.SeBootstrap.Configuration.Builderproperty(String name, Object value)Sets the propertynameto the providedvalue.default SeBootstrap.Configuration.Builderprotocol(String protocol)Convenience method to set theprotocolto be used.default SeBootstrap.Configuration.BuilderrootPath(String rootPath)Convenience method to set therootPathto be used.default SeBootstrap.Configuration.BuildersslClientAuthentication(SeBootstrap.Configuration.SSLClientAuthentication sslClientAuthentication)Convenience method to set SSL client authentication policy.default SeBootstrap.Configuration.BuildersslContext(SSLContext sslContext)Convenience method to set thesslContextto be used.
-
-
-
Method Detail
-
build
SeBootstrap.Configuration build()
Builds a bootstrap configuration instance from the provided property values.- Returns:
SeBootstrap.Configurationbuilt from provided property values.- Since:
- 3.1
-
property
SeBootstrap.Configuration.Builder property(String name, Object value)
Sets the propertynameto the providedvalue.This method does not check the validity, type or syntax of the provided value.
- Parameters:
name- name of the parameter to set.value- value to set, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
-
protocol
default SeBootstrap.Configuration.Builder protocol(String protocol)
Convenience method to set theprotocolto be used.Same as if calling
property(PROTOCOL, value).- Parameters:
protocol- protocol parameter of this configuration, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.PROTOCOL
-
host
default SeBootstrap.Configuration.Builder host(String host)
Convenience method to set thehostto be used.Same as if calling
property(HOST, value).- Parameters:
host- host parameter (IP address or hostname) of this configuration, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.HOST
-
port
default SeBootstrap.Configuration.Builder port(Integer port)
Convenience method to set theportto be used.Same as if calling
property(PORT, value).- Parameters:
port- port parameter of this configuration, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.PORT
-
rootPath
default SeBootstrap.Configuration.Builder rootPath(String rootPath)
Convenience method to set therootPathto be used.Same as if calling
property(ROOT_PATH, value).- Parameters:
rootPath- rootPath parameter of this configuration, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.ROOT_PATH
-
sslContext
default SeBootstrap.Configuration.Builder sslContext(SSLContext sslContext)
Convenience method to set thesslContextto be used.Same as if calling
property(SSL_CONTEXT, value).- Parameters:
sslContext- sslContext parameter of this configuration, ornullto use the default value.- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.SSL_CONTEXT
-
sslClientAuthentication
default SeBootstrap.Configuration.Builder sslClientAuthentication(SeBootstrap.Configuration.SSLClientAuthentication sslClientAuthentication)
Convenience method to set SSL client authentication policy.Same as if calling
property(SSL_CLIENT_AUTHENTICATION, value).- Parameters:
sslClientAuthentication- SSL client authentication mode of this configuration- Returns:
- the updated builder.
- Since:
- 3.1
- See Also:
SeBootstrap.Configuration.SSL_CLIENT_AUTHENTICATION
-
from
<T> SeBootstrap.Configuration.Builder from(BiFunction<String,Class<T>,Optional<T>> propertiesProvider)
Convenience method for bulk-loading configuration from a property supplier.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
Optionalisempty.- Type Parameters:
T- Type of the requested property value.- Parameters:
propertiesProvider- Retrieval function of externally managed properties. MUST NOT returnnull.- Returns:
- the updated builder.
- Since:
- 3.1
-
from
default SeBootstrap.Configuration.Builder from(Object externalConfig)
Optional convenience method to bulk-load external configuration.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.
- Parameters:
externalConfig- source of externally managed properties- Returns:
- the updated builder.
- Since:
- 3.1
-
-