Package org.glassfish.jersey.server
Class JerseySeBootstrapConfiguration
- java.lang.Object
-
- org.glassfish.jersey.server.JerseySeBootstrapConfiguration
-
- All Implemented Interfaces:
jakarta.ws.rs.SeBootstrap.Configuration
public final class JerseySeBootstrapConfiguration extends Object implements jakarta.ws.rs.SeBootstrap.Configuration
Jersey implementation ofSeBootstrap.Configurationimplementing arbitrary methods for acquiring the configuration settings.- Since:
- 3.1.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classJerseySeBootstrapConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowPrivilegedPorts()Defines if theWebServershould start on a privileged port when port is not set.booleanautoStart()Defines if theWebServershould automatically start.static JerseySeBootstrapConfiguration.Builderbuilder()Return a Jersey instance ofSeBootstrap.Configuration.Builderwith prefilled values.static JerseySeBootstrapConfigurationfrom(jakarta.ws.rs.SeBootstrap.Configuration configuration)Factory method creatingJerseySeBootstrapConfigurationwrapper aroundSeBootstrap.Configuration.booleanisHttps()If the protocol schema isHTTPS, returntrue.Objectproperty(String name)SSLContextsslContext()ReturnSSLContextin the configuration if the protocol scheme isHTTPS.URIuri(boolean resolveDefaultPort)ComposeURIbased on properties defined in this configuration.
-
-
-
Field Detail
-
RANDOM
protected static final Random RANDOM
-
-
Method Detail
-
property
public Object property(String name)
- Specified by:
propertyin interfacejakarta.ws.rs.SeBootstrap.Configuration
-
uri
public URI uri(boolean resolveDefaultPort)
ComposeURIbased on properties defined in this configuration.- Parameters:
resolveDefaultPort- iftruethe port is not set, it is resolved asContainer.DEFAULT_HTTP_PORTorContainer.DEFAULT_HTTPS_PORTbased on the protocol scheme.- Returns:
- Composed
URIbased on properties defined in this configuration.
-
sslContext
public SSLContext sslContext()
ReturnSSLContextin the configuration if the protocol scheme isHTTPS.- Specified by:
sslContextin interfacejakarta.ws.rs.SeBootstrap.Configuration- Returns:
- the SSLContext in the configuration.
-
isHttps
public boolean isHttps()
If the protocol schema isHTTPS, returntrue.- Returns:
truewhen the protocol schema isHTTPS.
-
autoStart
public boolean autoStart()
Defines if theWebServershould automatically start.- Returns:
- false if
ServerProperties.WEBSERVER_AUTO_STARTisfalse,trueotherwise.
-
allowPrivilegedPorts
public boolean allowPrivilegedPorts()
Defines if theWebServershould start on a privileged port when port is not set.- Returns:
- true if
ServerProperties.WEBSERVER_AUTO_STARTistrue,falseotherwise.
-
from
public static JerseySeBootstrapConfiguration from(jakarta.ws.rs.SeBootstrap.Configuration configuration)
Factory method creatingJerseySeBootstrapConfigurationwrapper aroundSeBootstrap.Configuration.- Parameters:
configuration- wrapped configuration- Returns:
JerseySeBootstrapConfigurationwrapper aroundSeBootstrap.Configuration.
-
builder
public static JerseySeBootstrapConfiguration.Builder builder()
Return a Jersey instance ofSeBootstrap.Configuration.Builderwith prefilled values.- Returns:
- a Jersey instance of
SeBootstrap.Configuration.Builder.
-
-