public class JerseyChannelInitializer extends ChannelInitializer<Channel>
ChannelInitializer that initializes
Channels by configuring their ChannelPipelines to include ChannelHandlers that transform
Netty HTTP and HTTP/2 messages into Jersey ContainerRequests that are then handled by an ApplicationHandler.ChannelHandler.Sharable| Constructor and Description |
|---|
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
Application jaxrsApplication)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
ApplicationHandler applicationHandler)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
Application jaxrsApplication)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
ApplicationHandler applicationHandler)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
long maxIncomingContentLength,
EventExecutorGroup jerseyEventExecutorGroup,
ApplicationHandler applicationHandler,
int flushThreshold,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
long maxIncomingContentLength,
EventExecutorGroup jerseyEventExecutorGroup,
Application jaxrsApplication,
int flushThreshold,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
long maxIncomingContentLength,
EventExecutorGroup jerseyEventExecutorGroup,
boolean useJerseyInjection,
ApplicationHandler applicationHandler,
int flushThreshold,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
long maxIncomingContentLength,
EventExecutorGroup jerseyEventExecutorGroup,
boolean useJerseyInjection,
Supplier<? extends ApplicationHandler> applicationHandlerSupplier,
int flushThreshold,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
long maxIncomingContentLength,
EventExecutorGroup jerseyEventExecutorGroup,
Supplier<? extends ApplicationHandler> applicationHandlerSupplier,
int flushThreshold,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
boolean http2Support,
Supplier<? extends ApplicationHandler> applicationHandlerSupplier)
Creates a new
JerseyChannelInitializer. |
JerseyChannelInitializer(URI baseUri,
SslContext sslContext,
Supplier<? extends ApplicationHandler> applicationHandlerSupplier)
Creates a new
JerseyChannelInitializer. |
| Modifier and Type | Method and Description |
|---|---|
protected SslHandler |
createSslHandler(SslContext sslContext,
ByteBufAllocator byteBufAllocator)
Creates and returns a new
SslHandler when invoked. |
URI |
getBaseUri()
Returns the
URI that was supplied at construction time. |
EventExecutorGroup |
getJerseyEventExecutorGroup()
Returns the
EventExecutorGroup that this JerseyChannelInitializer will use to offload blocking work from
the Netty event loop. |
protected void |
initChannel(Channel channel)
Initializes the supplied
Channel using an appropriate
sequencing of several ChannelHandlers and other Netty
utility classes. |
channelRegistered, exceptionCaught, handlerAdded, handlerRemovedchannelActive, channelInactive, channelRead, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, isSharablepublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, Application jaxrsApplication)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain textjaxrsApplication - the Application to run; may be
null somewhat pathologicallyJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, ApplicationHandler applicationHandler)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain textapplicationHandler - an ApplicationHandler
representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, Supplier<? extends ApplicationHandler> applicationHandlerSupplier)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain textapplicationHandlerSupplier - a Supplier of an ApplicationHandler representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, Application jaxrsApplication)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledjaxrsApplication - the Application to run; may be
null somewhat pathologicallyJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, ApplicationHandler applicationHandler)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledapplicationHandler - an ApplicationHandler
representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, Supplier<? extends ApplicationHandler> applicationHandlerSupplier)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledapplicationHandlerSupplier - a Supplier of an ApplicationHandler representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, long maxIncomingContentLength, EventExecutorGroup jerseyEventExecutorGroup, Application jaxrsApplication, int flushThreshold, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledmaxIncomingContentLength - in the case of HTTP to HTTP/2
upgrades, a long that governs the maximum permitted
incoming entity length in bytes; if less than 0 then
Long.MAX_VALUE will be used instead; if exactly 0
then if the HTTP message containing the upgrade header is
something like a POST it will be rejected with a 413 error code; ignored entirely if http2Support is
falsejerseyEventExecutorGroup - an EventExecutorGroup
that will manage the thread on which an ApplicationHandler.handle(ContainerRequest) call will occur; may
be null in which case a new DefaultEventExecutorGroup will be used insteadjaxrsApplication - the Application to run; may be
null somewhat pathologicallyflushThreshold - the minimum number of bytes that an AbstractByteBufBackedChannelOutboundInvokingOutputStream
returned by an implementation of the AbstractContainerRequestHandlingResponseWriter.createOutputStream(long,
ContainerResponse) method must write before an automatic
flush may take place; if less than 0 0 will be
used instead; if Integer.MAX_VALUE then it is suggested
that no automatic flushing will occurbyteBufCreator - a AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator that will be
passed to an
AbstractContainerRequestHandlingResponseWriter
implementation; may be nullJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, long maxIncomingContentLength, EventExecutorGroup jerseyEventExecutorGroup, ApplicationHandler applicationHandler, int flushThreshold, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledmaxIncomingContentLength - in the case of HTTP to HTTP/2
upgrades, a long that governs the maximum permitted
incoming entity length in bytes; if less than 0 then
Long.MAX_VALUE will be used instead; if exactly 0
then if the HTTP message containing the upgrade header is
something like a POST it will be rejected with a 413 error code; ignored entirely if http2Support is
falsejerseyEventExecutorGroup - an EventExecutorGroup
that will manage the thread on which an ApplicationHandler.handle(ContainerRequest) call will occur; may
be null in which case a new DefaultEventExecutorGroup will be used insteadapplicationHandler - an ApplicationHandler
representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notflushThreshold - the minimum number of bytes that an AbstractByteBufBackedChannelOutboundInvokingOutputStream
returned by an implementation of the AbstractContainerRequestHandlingResponseWriter.createOutputStream(long,
ContainerResponse) method must write before an automatic
flush may take place; if less than 0 0 will be
used instead; if Integer.MAX_VALUE then it is suggested
that no automatic flushing will occurbyteBufCreator - a AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator that will be
passed to an
AbstractContainerRequestHandlingResponseWriter
implementation; may be nullJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, ApplicationHandler, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, long maxIncomingContentLength, EventExecutorGroup jerseyEventExecutorGroup, Supplier<? extends ApplicationHandler> applicationHandlerSupplier, int flushThreshold, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledmaxIncomingContentLength - in the case of HTTP to HTTP/2
upgrades, a long that governs the maximum permitted
incoming entity length in bytes; if less than 0 then
Long.MAX_VALUE will be used instead; if exactly 0
then if the HTTP message containing the upgrade header is
something like a POST it will be rejected with a 413 error code; ignored entirely if http2Support is
falsejerseyEventExecutorGroup - an EventExecutorGroup
that will manage the thread on which an ApplicationHandler.handle(ContainerRequest) call will occur; may
be null in which case a new DefaultEventExecutorGroup will be used insteadapplicationHandlerSupplier - a Supplier of an ApplicationHandler representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notflushThreshold - the minimum number of bytes that an AbstractByteBufBackedChannelOutboundInvokingOutputStream
returned by an implementation of the AbstractContainerRequestHandlingResponseWriter.createOutputStream(long,
ContainerResponse) method must write before an automatic
flush may take place; if less than 0 0 will be
used instead; if Integer.MAX_VALUE then it is suggested
that no automatic flushing will occurbyteBufCreator - a AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator that will be
passed to an
AbstractContainerRequestHandlingResponseWriter
implementation; may be nullJerseyChannelInitializer(URI, SslContext, boolean, long,
EventExecutorGroup, boolean, Supplier, int,
AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator),
ContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, long maxIncomingContentLength, EventExecutorGroup jerseyEventExecutorGroup, boolean useJerseyInjection, ApplicationHandler applicationHandler, int flushThreshold, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledmaxIncomingContentLength - in the case of HTTP to HTTP/2
upgrades, a long that governs the maximum permitted
incoming entity length in bytes; if less than 0 then
Long.MAX_VALUE will be used instead; if exactly 0
then if the HTTP message containing the upgrade header is
something like a POST it will be rejected with a 413 error code; ignored entirely if http2Support is
falsejerseyEventExecutorGroup - an EventExecutorGroup
that will manage the thread on which an ApplicationHandler.handle(ContainerRequest) call will occur; may
be null in which case a new DefaultEventExecutorGroup will be used insteaduseJerseyInjection - if true then certain Netty
constructs like ChannelHandlerContext will be made
available for dependency injection in user applications using
Jersey's native dependency injection facilities; if false
then these facilities will not be used or referencedapplicationHandler - an ApplicationHandler
representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is notflushThreshold - the minimum number of bytes that an AbstractByteBufBackedChannelOutboundInvokingOutputStream
returned by an implementation of the AbstractContainerRequestHandlingResponseWriter.createOutputStream(long,
ContainerResponse) method must write before an automatic
flush may take place; if less than 0 0 will be
used instead; if Integer.MAX_VALUE then it is suggested
that no automatic flushing will occurbyteBufCreator - a AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator that will be
passed to an
AbstractContainerRequestHandlingResponseWriter
implementation; may be nullContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic JerseyChannelInitializer(URI baseUri, SslContext sslContext, boolean http2Support, long maxIncomingContentLength, EventExecutorGroup jerseyEventExecutorGroup, boolean useJerseyInjection, Supplier<? extends ApplicationHandler> applicationHandlerSupplier, int flushThreshold, AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator byteBufCreator)
JerseyChannelInitializer.baseUri - a URI that will serve as the base URI in a new
ContainerRequest; may be null in which case the
return value of URI.create("/") will
be used insteadsslContext - an SslContext; may be null in
which case network communications will occur in plain texthttp2Support - if HTTP/2 support (including upgrades, prior
knowledge, h2c, etc.) should be enabledmaxIncomingContentLength - in the case of HTTP to HTTP/2
upgrades, a long that governs the maximum permitted
incoming entity length in bytes; if less than 0 then
Long.MAX_VALUE will be used instead; if exactly 0
then if the HTTP message containing the upgrade header is
something like a POST it will be rejected with a 413 error code; ignored entirely if http2Support is
falsejerseyEventExecutorGroup - an EventExecutorGroup
that will manage the thread on which an ApplicationHandler.handle(ContainerRequest) call will occur; may
be null in which case a new DefaultEventExecutorGroup will be used insteaduseJerseyInjection - if true then certain Netty
constructs like ChannelHandlerContext will be made
available for dependency injection in user applications using
Jersey's native dependency injection facilities; if false
then these facilities will not be used or referencedapplicationHandlerSupplier - a Supplier of an ApplicationHandler representing a Jakarta RESTful Web Services application
whose ApplicationHandler.handle(ContainerRequest) method
will serve as the bridge between Netty and Jersey; may be null somewhat pathologically but normally is not.flushThreshold - the minimum number of bytes that an AbstractByteBufBackedChannelOutboundInvokingOutputStream
returned by an implementation of the AbstractContainerRequestHandlingResponseWriter.createOutputStream(long,
ContainerResponse) method must write before an automatic
flush may take place; if less than 0 0 will be
used instead; if Integer.MAX_VALUE then it is suggested
that no automatic flushing will occurbyteBufCreator - a AbstractByteBufBackedChannelOutboundInvokingOutputStream.ByteBufCreator that will be
passed to an
AbstractContainerRequestHandlingResponseWriter
implementation; may be nullContainerRequest,
SslContext,
HttpServerUpgradeHandler.HttpServerUpgradeHandler(SourceCodec,
UpgradeCodecFactory, int),
ApplicationHandler.handle(ContainerRequest),
AbstractContainerRequestHandlingResponseWriter,
HttpObjectToContainerRequestDecoder,
HttpContainerRequestHandlingResponseWriter,
Http2StreamFrameToContainerRequestDecoder,
Http2ContainerRequestHandlingResponseWriterpublic final EventExecutorGroup getJerseyEventExecutorGroup()
EventExecutorGroup that this JerseyChannelInitializer will use to offload blocking work from
the Netty event loop.
This method never returns null.
public final URI getBaseUri()
protected final void initChannel(Channel channel)
Channel using an appropriate
sequencing of several ChannelHandlers and other Netty
utility classes.
The ChannelHandlers and other classes involved include:
HttpObjectToContainerRequestDecoderHttpContainerRequestHandlingResponseWriterHttp2StreamFrameToContainerRequestDecoderHttp2ContainerRequestHandlingResponseWriterHttpServerCodecHttpServerUpgradeHandler.UpgradeCodecFactoryHttpServerUpgradeHandler.UpgradeCodecHttp2FrameCodecBuilderHttp2FrameCodecHttp2ServerUpgradeCodecHttp2MultiplexHandlerHttpServerUpgradeHandlerCleartextHttp2ServerUpgradeHandlerHttpServerExpectContinueHandlerHttpNegotiationHandlerAll of these classes collaborate to form a ChannelPipeline that can handle HTTP 1.0, HTTP 1.1 and HTTP/2
scenarios, including upgrades.
initChannel in class ChannelInitializer<Channel>channel - the Channel to initialize; must not be
nullNullPointerException - if channel is null, or if the return value of channel.pipeline() is nullprotected SslHandler createSslHandler(SslContext sslContext, ByteBufAllocator byteBufAllocator)
SslHandler when invoked.
This method never returns null.
Overrides of this method must not return null.
This implementation calls sslContext.newHandler(byteBufAllocator) and returns the
result.
sslContext - the SslContext that may assist in the
creation; must not be nullbyteBufAllocator - a ByteBufAllocator that may
assist in the creation; must not be nullSslHandler; never nullNullPointerException - if sslContext is nullSslContext.newHandler(ByteBufAllocator)Copyright © 2019–2020, microBean™. All rights reserved.