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.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-
Nested classes/interfaces inherited from interface jakarta.ws.rs.SeBootstrap.Configuration
SeBootstrap.Configuration.SSLClientAuthentication
-
-
Field Summary
Fields Modifier and Type Field Description protected static RandomRANDOM-
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 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(SeBootstrap.Configuration configuration)Factory method creatingJerseySeBootstrapConfigurationwrapper aroundSeBootstrap.Configuration.booleanisHttps()If the protocol schema isHTTPS, returntrue.Objectproperty(String name)Returns the value of the property with the given name, ornullif there is no property of that name.SSLContextsslContext()ReturnSSLContextin the configuration if the protocol scheme isHTTPS.URIuri(boolean resolveDefaultPort)ComposeURIbased 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)
Description copied from interface:SeBootstrap.ConfigurationReturns the value of the property with the given name, ornullif there is no property of that name.- Specified by:
propertyin interfaceSeBootstrap.Configuration- Parameters:
name- aStringspecifying the name of the property.- Returns:
- an
Objectcontaining the value of the property, ornullif no property exists matching the given name.
-
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 interfaceSeBootstrap.Configuration- Returns:
- the SSLContext in the configuration.
- See Also:
SeBootstrap.Configuration.SSL_CONTEXT
-
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(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.
-
-