public final class HttpServerCodec extends io.netty.channel.CombinedChannelDuplexHandler implements io.netty.channel.ChannelInboundByteHandler, io.netty.channel.ChannelOutboundMessageHandler<HttpObject>
HttpRequestDecoder and HttpResponseEncoder
which enables easier server side HTTP implementation.HttpClientCodec| 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 |
discardInboundReadBytes(io.netty.channel.ChannelHandlerContext ctx) |
void |
freeInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
void |
freeOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.ByteBuf |
newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
io.netty.buffer.MessageBuf<HttpObject> |
newOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) |
afterAdd, afterRemove, beforeAdd, beforeRemove, bind, channelActive, channelInactive, channelRegistered, channelUnregistered, close, connect, deregister, disconnect, exceptionCaught, flush, inboundBufferUpdated, init, operationHandler, read, sendFile, stateHandler, userEventTriggeredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchannelActive, channelInactive, channelReadSuspended, channelRegistered, channelUnregistered, inboundBufferUpdated, userEventTriggeredpublic HttpServerCodec()
maxInitialLineLength (4096}, maxHeaderSize (8192), and
maxChunkSize (8192)).public HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize)
public io.netty.buffer.ByteBuf newInboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
newInboundBuffer in interface io.netty.channel.ChannelInboundByteHandlerExceptionpublic void discardInboundReadBytes(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
discardInboundReadBytes in interface io.netty.channel.ChannelInboundByteHandlerExceptionpublic void freeInboundBuffer(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
Exceptionpublic io.netty.buffer.MessageBuf<HttpObject> newOutboundBuffer(io.netty.channel.ChannelHandlerContext ctx) throws Exception
newOutboundBuffer in interface io.netty.channel.ChannelOutboundMessageHandler<HttpObject>ExceptionCopyright © 2008-2013 The Netty Project. All Rights Reserved.