Package org.glassfish.jersey.jdkhttp
Class JdkHttpServerFactory
java.lang.Object
org.glassfish.jersey.jdkhttp.JdkHttpServerFactory
Factory for creating
JDK HttpServer instances to run Jersey applications.- Author:
- Miroslav Fuksa, Marek Potociar
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpServercreateHttpServer(URI uri, ResourceConfig configuration) Create and start theJDK HttpServerwith the Jersey application deployed at the givenURI.static HttpServercreateHttpServer(URI uri, ResourceConfig configuration, boolean start) Create (and possibly start) theJDK HttpServerwith the JAX-RS / Jersey application deployed on the givenURI.static HttpServercreateHttpServer(URI uri, ResourceConfig configuration, Object parentContext) Create (and possibly start) theJDK HttpServerwith the JAX-RS / Jersey application deployed on the givenURI.static HttpServercreateHttpServer(URI uri, ResourceConfig configuration, Object parentContext, SSLContext sslContext, boolean start) Create (and possibly start) theJDK HttpServer, eventuallyHttpServer's subclassHttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.static HttpServercreateHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext) Create and start theJDK HttpServer, eventuallyHttpServer's subclassJDK HttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.static HttpServercreateHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext, boolean start) Create (and possibly start) theJDK HttpServer, eventuallyHttpServer's subclassJDK HttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.
-
Method Details
-
createHttpServer
Create and start theJDK HttpServerwith the Jersey application deployed at the givenURI.The returned
JDK HttpServeris started.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.
-
createHttpServer
Create (and possibly start) theJDK HttpServerwith the JAX-RS / Jersey application deployed on the givenURI.The
startflag controls whether or not the returnedJDK HttpServeris started.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.start- if set tofalse, the created server will not be automatically started.- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.- Since:
- 2.8
-
createHttpServer
public static HttpServer createHttpServer(URI uri, ResourceConfig configuration, Object parentContext) Create (and possibly start) theJDK HttpServerwith the JAX-RS / Jersey application deployed on the givenURI.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.parentContext- DI provider specific context with application's registered bindings.- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.- Since:
- 2.12
- See Also:
-
createHttpServer
public static HttpServer createHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext) Create and start theJDK HttpServer, eventuallyHttpServer's subclassJDK HttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.The returned
JDK HttpServeris started.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.sslContext- customSSLContextto be passed to the server- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.- Since:
- 2.18
-
createHttpServer
public static HttpServer createHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext, boolean start) Create (and possibly start) theJDK HttpServer, eventuallyHttpServer's subclassJDK HttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.The
startflag controls whether or not the returnedJDK HttpServeris started.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.sslContext- customSSLContextto be passed to the serverstart- if set tofalse, the created server will not be automatically started.- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.- Since:
- 2.17
-
createHttpServer
public static HttpServer createHttpServer(URI uri, ResourceConfig configuration, Object parentContext, SSLContext sslContext, boolean start) Create (and possibly start) theJDK HttpServer, eventuallyHttpServer's subclassHttpsServerwith the JAX-RS / Jersey application deployed on the givenURI.The
startflag controls whether or not the returnedJDK HttpServeris started.- Parameters:
uri- theurion which the Jersey application will be deployed.configuration- the Jersey server-side application configuration.parentContext- DI provider specific context with application's registered bindings.sslContext- customSSLContextto be passed to the serverstart- if set tofalse, the created server will not be automatically started.- Returns:
- Newly created
HttpServer. - Throws:
ProcessingException- thrown when problems during server creation occurs.- Since:
- 2.18
-