Package org.glassfish.jersey.server
Class WebServerFactory
java.lang.Object
org.glassfish.jersey.server.WebServerFactory
Factory for creating specific HTTP servers.
- Since:
- 3.1.0
- Author:
- Markus KARG (markus@headcrashing.eu)
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends WebServer>
TcreateServer
(Class<T> type, Application application, SeBootstrap.Configuration configuration) Creates a server of a given type which runs the given application using the given bootstrap configuration.static <T extends WebServer>
TcreateServer
(Class<T> type, Class<? extends Application> application, SeBootstrap.Configuration configuration) Creates a server of a given type which runs the given application using the given bootstrap configuration.
-
Method Details
-
createServer
public static <T extends WebServer> T createServer(Class<T> type, Application application, SeBootstrap.Configuration configuration) Creates a server of a given type which runs the given application using the given bootstrap configuration.The list of service-providers supporting the
WebServerProvider
service-provider will be iterated over until one returns a non-null server instance.- Type Parameters:
T
- the type of the server.- Parameters:
type
- the type of the server. Providers SHOULD support at leastWebServer
.application
- The application to host.configuration
- The configuration (host, port, etc.) to be used for bootstrapping.- Returns:
- the created server.
- Throws:
ProcessingException
- if there is an error creating the server.IllegalArgumentException
- if no server provider supports the type.
-
createServer
public static <T extends WebServer> T createServer(Class<T> type, Class<? extends Application> application, SeBootstrap.Configuration configuration) Creates a server of a given type which runs the given application using the given bootstrap configuration.The list of service-providers supporting the
WebServerProvider
service-provider will be iterated over until one returns a non-null server instance.- Type Parameters:
T
- the type of the server.- Parameters:
type
- the type of the server. Providers SHOULD support at leastWebServer
.application
- The application to host.configuration
- The configuration (host, port, etc.) to be used for bootstrapping.- Returns:
- the created server.
- Throws:
ProcessingException
- if there is an error creating the server.IllegalArgumentException
- if no server provider supports the type.
-