Class JerseySeBootstrapConfiguration.Builder
- java.lang.Object
-
- org.glassfish.jersey.server.JerseySeBootstrapConfiguration.Builder
-
- All Implemented Interfaces:
SeBootstrap.Configuration.Builder
- Enclosing class:
- JerseySeBootstrapConfiguration
public static final class JerseySeBootstrapConfiguration.Builder extends Object implements SeBootstrap.Configuration.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JerseySeBootstrapConfiguration.BuilderautoStart(Boolean autostart)Define if theWebServershould auto-start at bootstrap.JerseySeBootstrapConfigurationbuild()Builds a bootstrap configuration instance from the provided property values.JerseySeBootstrapConfiguration.Builderfrom(Object externalConfig)Optional convenience method to bulk-load external configuration.<T> JerseySeBootstrapConfiguration.Builderfrom(BiFunction<String,Class<T>,Optional<T>> configProvider)Convenience method for bulk-loading configuration from a property supplier.JerseySeBootstrapConfiguration.Builderproperty(String name, Object value)Sets the propertynameto the providedvalue.JerseySeBootstrapConfiguration.BuilderwebServerClass(Class<? extends WebServer> webServerClass)Set the the respectiveWebServerclass to be used by theWebServerProvider.-
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.Builder
host, port, protocol, rootPath, sslClientAuthentication, sslContext
-
-
-
-
Method Detail
-
build
public JerseySeBootstrapConfiguration build()
Description copied from interface:SeBootstrap.Configuration.BuilderBuilds a bootstrap configuration instance from the provided property values.- Specified by:
buildin interfaceSeBootstrap.Configuration.Builder- Returns:
SeBootstrap.Configurationbuilt from provided property values.
-
property
public JerseySeBootstrapConfiguration.Builder property(String name, Object value)
Description copied from interface:SeBootstrap.Configuration.BuilderSets the propertynameto the providedvalue.This method does not check the validity, type or syntax of the provided value.
- Specified by:
propertyin interfaceSeBootstrap.Configuration.Builder- Parameters:
name- name of the parameter to set.value- value to set, ornullto use the default value.- Returns:
- the updated builder.
-
webServerClass
public JerseySeBootstrapConfiguration.Builder webServerClass(Class<? extends WebServer> webServerClass)
Set the the respectiveWebServerclass to be used by theWebServerProvider.- Parameters:
webServerClass- the class implementingWebServer.- Returns:
- the updated builder.
-
autoStart
public JerseySeBootstrapConfiguration.Builder autoStart(Boolean autostart)
Define if theWebServershould auto-start at bootstrap.- Parameters:
autostart- the auto-start flag.- Returns:
- the updated builder.
-
from
public <T> JerseySeBootstrapConfiguration.Builder from(BiFunction<String,Class<T>,Optional<T>> configProvider)
Description copied from interface:SeBootstrap.Configuration.BuilderConvenience 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.- Specified by:
fromin interfaceSeBootstrap.Configuration.Builder- Type Parameters:
T- Type of the requested property value.- Parameters:
configProvider- Retrieval function of externally managed properties. MUST NOT returnnull.- Returns:
- the updated builder.
-
from
public JerseySeBootstrapConfiguration.Builder from(Object externalConfig)
Description copied from interface:SeBootstrap.Configuration.BuilderOptional 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.
- Specified by:
fromin interfaceSeBootstrap.Configuration.Builder- Parameters:
externalConfig- source of externally managed properties- Returns:
- the updated builder.
-
-