Package org.glassfish.jersey.server
Class WebServerFactory
- java.lang.Object
-
- org.glassfish.jersey.server.WebServerFactory
-
public final class WebServerFactory extends Object
Factory for creating specific HTTP servers.- Since:
- 3.1.0
- Author:
- Markus KARG (markus@headcrashing.eu)
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <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 Detail
-
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
WebServerProviderservice-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
WebServerProviderservice-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.
-
-