Package org.glassfish.jersey.server
Class JerseySeBootstrapConfiguration
- java.lang.Object
-
- org.glassfish.jersey.server.JerseySeBootstrapConfiguration
-
- All Implemented Interfaces:
SeBootstrap.Configuration
public final class JerseySeBootstrapConfiguration extends Object implements SeBootstrap.Configuration
Jersey implementation ofSeBootstrap.Configuration
implementing arbitrary methods for acquiring the configuration settings.- Since:
- 3.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JerseySeBootstrapConfiguration.Builder
-
Nested classes/interfaces inherited from interface jakarta.ws.rs.SeBootstrap.Configuration
SeBootstrap.Configuration.SSLClientAuthentication
-
-
Field Summary
Fields Modifier and Type Field Description protected static Random
RANDOM
-
Fields inherited from interface jakarta.ws.rs.SeBootstrap.Configuration
DEFAULT_PORT, FREE_PORT, HOST, PORT, PROTOCOL, ROOT_PATH, SSL_CLIENT_AUTHENTICATION, SSL_CONTEXT
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allowPrivilegedPorts()
Defines if theWebServer
should start on a privileged port when port is not set.boolean
autoStart()
Defines if theWebServer
should automatically start.static JerseySeBootstrapConfiguration.Builder
builder()
Return a Jersey instance ofSeBootstrap.Configuration.Builder
with prefilled values.static JerseySeBootstrapConfiguration
from(SeBootstrap.Configuration configuration)
Factory method creatingJerseySeBootstrapConfiguration
wrapper aroundSeBootstrap.Configuration
.boolean
isHttps()
If the protocol schema isHTTPS
, returntrue
.Object
property(String name)
SSLContext
sslContext()
ReturnSSLContext
in the configuration if the protocol scheme isHTTPS
.URI
uri(boolean resolveDefaultPort)
ComposeURI
based on properties defined in this configuration.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jakarta.ws.rs.SeBootstrap.Configuration
baseUri, baseUriBuilder, hasProperty, host, port, protocol, rootPath, sslClientAuthentication
-
-
-
-
Field Detail
-
RANDOM
protected static final Random RANDOM
-
-
Method Detail
-
property
public Object property(String name)
- Specified by:
property
in interfaceSeBootstrap.Configuration
-
uri
public URI uri(boolean resolveDefaultPort)
ComposeURI
based on properties defined in this configuration.- Parameters:
resolveDefaultPort
- iftrue
the port is not set, it is resolved asContainer.DEFAULT_HTTP_PORT
orContainer.DEFAULT_HTTPS_PORT
based on the protocol scheme.- Returns:
- Composed
URI
based on properties defined in this configuration.
-
sslContext
public SSLContext sslContext()
ReturnSSLContext
in the configuration if the protocol scheme isHTTPS
.- Specified by:
sslContext
in interfaceSeBootstrap.Configuration
- Returns:
- the SSLContext in the configuration.
-
isHttps
public boolean isHttps()
If the protocol schema isHTTPS
, returntrue
.- Returns:
true
when the protocol schema isHTTPS
.
-
autoStart
public boolean autoStart()
Defines if theWebServer
should automatically start.- Returns:
- false if
ServerProperties.WEBSERVER_AUTO_START
isfalse
,true
otherwise.
-
allowPrivilegedPorts
public boolean allowPrivilegedPorts()
Defines if theWebServer
should start on a privileged port when port is not set.- Returns:
- true if
ServerProperties.WEBSERVER_AUTO_START
istrue
,false
otherwise.
-
from
public static JerseySeBootstrapConfiguration from(SeBootstrap.Configuration configuration)
Factory method creatingJerseySeBootstrapConfiguration
wrapper aroundSeBootstrap.Configuration
.- Parameters:
configuration
- wrapped configuration- Returns:
JerseySeBootstrapConfiguration
wrapper aroundSeBootstrap.Configuration
.
-
builder
public static JerseySeBootstrapConfiguration.Builder builder()
Return a Jersey instance ofSeBootstrap.Configuration.Builder
with prefilled values.- Returns:
- a Jersey instance of
SeBootstrap.Configuration.Builder
.
-
-