public class HttpServerCodec extends java.lang.Object implements ChannelUpstreamHandler, ChannelDownstreamHandler
HttpRequestDecoder and HttpResponseEncoder
which enables easier server side HTTP implementation.HttpClientCodecChannelHandler.Sharable| Modifier and Type | Field and Description |
|---|---|
private HttpRequestDecoder |
decoder |
private HttpResponseEncoder |
encoder |
| Constructor and Description |
|---|
HttpServerCodec()
Creates a new instance with the default decoder options
(
maxInitialLineLength (4096}, maxHeaderSize (8192), and
maxChunkSize (8192)). |
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize)
Creates a new instance with the specified decoder options.
|
| Modifier and Type | Method and Description |
|---|---|
void |
handleDownstream(ChannelHandlerContext ctx,
ChannelEvent e)
Handles the specified downstream event.
|
void |
handleUpstream(ChannelHandlerContext ctx,
ChannelEvent e)
Handles the specified upstream event.
|
private final HttpRequestDecoder decoder
private final HttpResponseEncoder encoder
public HttpServerCodec()
maxInitialLineLength (4096}, maxHeaderSize (8192), and
maxChunkSize (8192)).public HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize)
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
ChannelUpstreamHandlerhandleUpstream in interface ChannelUpstreamHandlerctx - the context object for this handlere - the upstream event to process or interceptjava.lang.Exceptionpublic void handleDownstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
ChannelDownstreamHandlerhandleDownstream in interface ChannelDownstreamHandlerctx - the context object for this handlere - the downstream event to process or interceptjava.lang.Exception