public final class GrizzlyHttpServerFactory extends Object
Should you need to fine tune the underlying Grizzly transport layer, you can obtain direct access to the corresponding
Grizzly structures with server.getListener("grizzly").getTransport(). To make certain options take effect,
you need to work with an inactive HttpServer instance (that is the one that has not been started yet).
To obtain such an instance, use one of the below factory methods with start
parameter set to false
.
When the start
parameter is not present, the factory method returns an already started instance.
HttpServer
,
GrizzlyHttpContainer
Modifier and Type | Method and Description |
---|---|
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
boolean start)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
GrizzlyHttpContainer handler,
boolean secure,
org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator,
boolean start)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
boolean start)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
boolean secure,
org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig configuration,
boolean secure,
org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator,
boolean start)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig config,
boolean secure,
org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator,
Object parentContext)
Create new
HttpServer instance. |
static org.glassfish.grizzly.http.server.HttpServer |
createHttpServer(URI uri,
ResourceConfig config,
Object parentContext)
Create new
HttpServer instance. |
public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri)
HttpServer
instance.uri
- uri on which the ApplicationHandler
will be deployed. Only first path segment will be used as
context path, the rest will be ignored.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, boolean start)
HttpServer
instance.uri
- uri on which the ApplicationHandler
will be deployed. Only first path segment will be used
as context path, the rest will be ignored.start
- if set to false, server will not get started, which allows to configure the underlying transport
layer, see above for details.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig configuration)
HttpServer
instance.uri
- URI on which the Jersey web application will be deployed. Only first path segment will be
used as context path, the rest will be ignored.configuration
- web application configuration.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig configuration, boolean start)
HttpServer
instance.uri
- URI on which the Jersey web application will be deployed. Only first path segment will be
used as context path, the rest will be ignored.configuration
- web application configuration.start
- if set to false, server will not get started, which allows to configure the underlying
transport layer, see above for details.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig configuration, boolean secure, org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator)
HttpServer
instance.uri
- URI on which the Jersey web application will be deployed. Only first path segment
will be used as context path, the rest will be ignored.configuration
- web application configuration.secure
- used for call NetworkListener.setSecure(boolean)
.sslEngineConfigurator
- Ssl settings to be passed to NetworkListener.setSSLEngineConfig(org.glassfish.grizzly.ssl.SSLEngineConfigurator)
.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig configuration, boolean secure, org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator, boolean start)
HttpServer
instance.uri
- URI on which the Jersey web application will be deployed. Only first path segment
will be used as context path, the rest will be ignored.configuration
- web application configuration.secure
- used for call NetworkListener.setSecure(boolean)
.sslEngineConfigurator
- Ssl settings to be passed to NetworkListener.setSSLEngineConfig(org.glassfish.grizzly.ssl.SSLEngineConfigurator)
.start
- if set to false, server will not get started, which allows to configure the
underlying transport, see above for details.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig config, boolean secure, org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator, Object parentContext)
HttpServer
instance.uri
- uri on which the ApplicationHandler
will be deployed. Only first path
segment will be used as context path, the rest will be ignored.config
- web application configuration.secure
- used for call NetworkListener.setSecure(boolean)
.sslEngineConfigurator
- Ssl settings to be passed to NetworkListener.setSSLEngineConfig(org.glassfish.grizzly.ssl.SSLEngineConfigurator)
.parentContext
- DI provider specific context with application's registered bindings.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.GrizzlyHttpContainer
public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, ResourceConfig config, Object parentContext)
HttpServer
instance.uri
- uri on which the ApplicationHandler
will be deployed. Only first path
segment will be used as context path, the rest will be ignored.config
- web application configuration.parentContext
- DI provider specific context with application's registered bindings.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.GrizzlyHttpContainer
public static org.glassfish.grizzly.http.server.HttpServer createHttpServer(URI uri, GrizzlyHttpContainer handler, boolean secure, org.glassfish.grizzly.ssl.SSLEngineConfigurator sslEngineConfigurator, boolean start)
HttpServer
instance.uri
- uri on which the ApplicationHandler
will be deployed. Only first path
segment will be used as context path, the rest will be ignored.handler
- HttpHandler
instance.secure
- used for call NetworkListener.setSecure(boolean)
.sslEngineConfigurator
- Ssl settings to be passed to NetworkListener.setSSLEngineConfig(org.glassfish.grizzly.ssl.SSLEngineConfigurator)
.start
- if set to false, server will not get started, this allows end users to set
additional properties on the underlying listener.HttpServer
.javax.ws.rs.ProcessingException
- in case of any failure when creating a new HttpServer
instance.GrizzlyHttpContainer
Copyright © 2007-2017, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.