public final class HttpServerCodec extends ChannelHandlerAppender implements HttpServerUpgradeHandler.SourceCodec
HttpRequestDecoder and HttpResponseEncoder
which enables easier server side HTTP implementation. Also supports use with
a HttpServerUpgradeHandler to support upgrading to another protocol
from HTTP.HttpClientCodec,
HttpServerUpgradeHandlerChannelHandler.Sharable, ChannelHandler.Skip| 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.
|
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders)
Creates a new instance with the specified decoder options.
|
| Modifier and Type | Method and Description |
|---|---|
HttpRequestDecoder |
decoder()
Returns the decoder of this codec.
|
HttpResponseEncoder |
encoder()
Returns the encoder of this codec.
|
void |
upgradeFrom(ChannelHandlerContext ctx)
Upgrades to another protocol from HTTP.
|
add, add, add, add, handlerAdded, handlerAtbind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerRemoved, isSharable, read, userEventTriggered, writepublic HttpServerCodec()
maxInitialLineLength (4096}, maxHeaderSize (8192), and
maxChunkSize (8192)).public HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize)
public HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders)
public void upgradeFrom(ChannelHandlerContext ctx)
HttpRequestDecoder and
HttpResponseEncoder from the pipeline.upgradeFrom in interface HttpServerUpgradeHandler.SourceCodecpublic HttpResponseEncoder encoder()
public HttpRequestDecoder decoder()
Copyright © 2008–2015 The Netty Project. All rights reserved.