public static interface SeBootstrap.Configuration
The configuration essentially consists of a set of parameters. While the set of actually effective keys is product
specific, the key constants defined by the SeBootstrap.Configuration
interface MUST be effective on all compliant
products. Any unknown key MUST be silently ignored.
Modifier and Type | Interface and Description |
---|---|
static interface |
SeBootstrap.Configuration.Builder
Builder for bootstrap
SeBootstrap.Configuration . |
static class |
SeBootstrap.Configuration.SSLClientAuthentication
Secure socket client authentication policy
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT
Special value for
PORT property indicating that the implementation MUST use its default port. |
static int |
FREE_PORT
Special value for
PORT property indicating that the implementation MUST scan for a free port. |
static java.lang.String |
HOST
Configuration key for the hostname or IP address an application is bound to.
|
static java.lang.String |
PORT
Configuration key for the TCP port an application is bound to.
|
static java.lang.String |
PROTOCOL
Configuration key for the protocol an application is bound to.
|
static java.lang.String |
ROOT_PATH
Configuration key for the root path an application is bound to.
|
static java.lang.String |
SSL_CLIENT_AUTHENTICATION
Configuration key for the secure socket client authentication policy.
|
static java.lang.String |
SSL_CONTEXT
Configuration key for the secure socket configuration to be used.
|
Modifier and Type | Method and Description |
---|---|
default java.net.URI |
baseUri()
Convenience method that returns a built the
URI for the application. |
default UriBuilder |
baseUriBuilder()
Returns a
UriBuilder that includes the application root path. |
static SeBootstrap.Configuration.Builder |
builder()
Creates a new bootstrap configuration builder instance.
|
default boolean |
hasProperty(java.lang.String name)
Returns whether the property with the given name is configured, either explicitly or by default.
|
default java.lang.String |
host()
Convenience method to get the
host to be used. |
default int |
port()
Convenience method to get the actually used
port . |
java.lang.Object |
property(java.lang.String name)
Returns the value of the property with the given name, or
null if there is no property of that name. |
default java.lang.String |
protocol()
Convenience method to get the
protocol to be used. |
default java.lang.String |
rootPath()
Convenience method to get the
rootPath to be used. |
default SeBootstrap.Configuration.SSLClientAuthentication |
sslClientAuthentication()
Convenience method to get the secure socket client authentication policy.
|
default javax.net.ssl.SSLContext |
sslContext()
Convenience method to get the
sslContext to be used. |
static final java.lang.String PROTOCOL
A compliant implementation at least MUST accept the strings "HTTP"
and "HTTPS"
if these protocols are
supported.
The default value is "HTTP"
.
static final java.lang.String HOST
A compliant implementation at least MUST accept string values bearing hostnames, IP4 address text representations,
and IP6 address text representations. If a hostname string, the special IP4 address string "0.0.0.0"
or
"::"
for IP6 is provided, the application MUST be bound to all IP addresses assigned to that
hostname. If the hostname string is "localhost"
the application MUST be bound to the local host's loopback
adapter only.
The default value is "localhost"
.
static final java.lang.String PORT
A compliant implementation MUST accept java.lang.Integer
values.
There is no default port mandated by this specification, but the default value of this property is
DEFAULT_PORT
(i. e. -1
). A compliant implementation MUST use its own default port when
the value -1
is provided, and MAY apply (but is not obligated to) auto-selection and
range-scanning algorithms.
static final java.lang.String ROOT_PATH
The default value is "/"
.
static final java.lang.String SSL_CONTEXT
The default value is SSLContext.getDefault()
.
static final java.lang.String SSL_CLIENT_AUTHENTICATION
A compliant implementation MUST accept SeBootstrap.Configuration.SSLClientAuthentication
enums.
The default value is SSLClientAuthentication#NONE
.
static final int FREE_PORT
PORT
property indicating that the implementation MUST scan for a free port.static final int DEFAULT_PORT
PORT
property indicating that the implementation MUST use its default port.java.lang.Object property(java.lang.String name)
null
if there is no property of that name.name
- a String
specifying the name of the property.Object
containing the value of the property, or null
if no property exists matching the
given name.default boolean hasProperty(java.lang.String name)
name
- a String
specifying the name of the property.false
if no property exists matching the given name, true
otherwise.default java.lang.String protocol()
protocol
to be used.
Same as if calling (String) property(PROTOCOL)
.
"HTTP")
.java.lang.ClassCastException
- if protocol is not a String
.PROTOCOL
default java.lang.String host()
host
to be used.
Same as if calling (String) property(HOST)
.
"localhost"
or "0.0.0.0"
).java.lang.ClassCastException
- if host is not a String
.HOST
default int port()
port
.
Same as if calling (int) property(PORT)
.
If the port was not explicitly given, this will return the port chosen implicitly by the JAX-RS implementation.
8080
).java.lang.ClassCastException
- if port is not an Integer
.PORT
default java.lang.String rootPath()
rootPath
to be used.
Same as if calling (String) property(ROOT_PATH)
.
"/"
.java.lang.ClassCastException
- if root path is not a String
.ROOT_PATH
default javax.net.ssl.SSLContext sslContext()
sslContext
to be used.
Same as if calling (SSLContext) property(SSL_CONTEXT)
.
"/"
.java.lang.ClassCastException
- if sslContext is not a SSLContext
.SSL_CONTEXT
default SeBootstrap.Configuration.SSLClientAuthentication sslClientAuthentication()
Same as if calling (SSLClientAuthentication) property(SSL_CLIENT_AUTHENTICATION)
.
NONE
.java.lang.ClassCastException
- if sslClientAuthentication is not a SeBootstrap.Configuration.SSLClientAuthentication
.SSL_CLIENT_AUTHENTICATION
default UriBuilder baseUriBuilder()
UriBuilder
that includes the application root path.UriBuilder
for the application.default java.net.URI baseUri()
URI
for the application.URI
for the application.baseUriBuilder()
static SeBootstrap.Configuration.Builder builder()
SeBootstrap.Configuration.Builder
for bootstrap configuration.