public final class JdkHttpServerFactory extends Object
JDK HttpServer
instances to run Jersey applications.Modifier and Type | Method and Description |
---|---|
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration)
Create and start the
JDK HttpServer with the Jersey application deployed
at the given URI . |
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
boolean start)
Create (and possibly start) the
JDK HttpServer with the JAX-RS / Jersey application deployed
on the given URI . |
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
Object parentContext)
Create (and possibly start) the
JDK HttpServer with the JAX-RS / Jersey application deployed
on the given URI . |
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
Object parentContext,
SSLContext sslContext,
boolean start)
Create (and possibly start) the
JDK HttpServer , eventually HttpServer 's subclass
HttpsServer with the JAX-RS / Jersey application deployed on the given URI . |
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
SSLContext sslContext)
Create and start the
JDK HttpServer , eventually HttpServer 's subclass
JDK HttpsServer with the JAX-RS / Jersey application deployed on the given URI . |
static com.sun.net.httpserver.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
SSLContext sslContext,
boolean start)
Create (and possibly start) the
JDK HttpServer , eventually HttpServer 's subclass
JDK HttpsServer with the JAX-RS / Jersey application deployed on the given URI . |
public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration)
JDK HttpServer
with the Jersey application deployed
at the given URI
.
The returned JDK HttpServer
is started.
uri
- the uri
on which the Jersey application will be deployed.configuration
- the Jersey server-side application configuration.HttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation
occurs.public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration, boolean start)
JDK HttpServer
with the JAX-RS / Jersey application deployed
on the given URI
.
The start
flag controls whether or not the returned JDK HttpServer
is started.
uri
- the uri
on which the Jersey application will be deployed.configuration
- the Jersey server-side application configuration.start
- if set to false
, the created server will not be automatically started.HttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation occurs.public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration, Object parentContext)
JDK HttpServer
with the JAX-RS / Jersey application deployed
on the given URI
.
uri
- the uri
on which the Jersey application will be deployed.configuration
- the Jersey server-side application configuration.parentContext
- DI provider specific context with application's registered bindings.HttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation occurs.JdkHttpHandlerContainer
public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext)
JDK HttpServer
, eventually HttpServer
's subclass
JDK HttpsServer
with the JAX-RS / Jersey application deployed on the given URI
.
The returned JDK HttpServer
is started.
uri
- the uri
on which the Jersey application will be deployed.configuration
- the Jersey server-side application configuration.sslContext
- custom SSLContext
to be passed to the serverHttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation occurs.public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration, SSLContext sslContext, boolean start)
JDK HttpServer
, eventually HttpServer
's subclass
JDK HttpsServer
with the JAX-RS / Jersey application deployed on the given URI
.
The start
flag controls whether or not the returned JDK HttpServer
is started.
uri
- the uri
on which the Jersey application will be deployed.configuration
- the Jersey server-side application configuration.sslContext
- custom SSLContext
to be passed to the serverstart
- if set to false
, the created server will not be automatically started.HttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation occurs.public static com.sun.net.httpserver.HttpServer createHttpServer(URI uri, ResourceConfig configuration, Object parentContext, SSLContext sslContext, boolean start)
JDK HttpServer
, eventually HttpServer
's subclass
HttpsServer
with the JAX-RS / Jersey application deployed on the given URI
.
The start
flag controls whether or not the returned JDK HttpServer
is started.
uri
- the uri
on 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
- custom SSLContext
to be passed to the serverstart
- if set to false
, the created server will not be automatically started.HttpServer
.jakarta.ws.rs.ProcessingException
- thrown when problems during server creation occurs.Copyright © 2007-2021, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.