public final class HttpServerCodec extends io.netty.channel.CombinedChannelDuplexHandler<HttpRequestDecoder,HttpResponseEncoder> implements HttpServerUpgradeHandler.SourceCodec
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.
|
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders)
Creates a new instance with the specified decoder options.
|
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders,
int initialBufferSize)
Creates a new instance with the specified decoder options.
|
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders,
int initialBufferSize,
boolean allowDuplicateContentLengths)
Creates a new instance with the specified decoder options.
|
HttpServerCodec(int maxInitialLineLength,
int maxHeaderSize,
int maxChunkSize,
boolean validateHeaders,
int initialBufferSize,
boolean allowDuplicateContentLengths,
boolean allowPartialChunks)
Creates a new instance with the specified decoder options.
|
Modifier and Type | Method and Description |
---|---|
void |
upgradeFrom(io.netty.channel.ChannelHandlerContext ctx)
Upgrades to another protocol from HTTP.
|
bind, channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, close, connect, deregister, disconnect, exceptionCaught, flush, handlerAdded, handlerRemoved, inboundHandler, init, outboundHandler, read, removeInboundHandler, removeOutboundHandler, userEventTriggered, write
public 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 HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, int initialBufferSize)
public HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, int initialBufferSize, boolean allowDuplicateContentLengths)
public HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize, boolean validateHeaders, int initialBufferSize, boolean allowDuplicateContentLengths, boolean allowPartialChunks)
public void upgradeFrom(io.netty.channel.ChannelHandlerContext ctx)
HttpRequestDecoder
and
HttpResponseEncoder
from the pipeline.upgradeFrom
in interface HttpServerUpgradeHandler.SourceCodec
Copyright © 2008–2023 The Netty Project. All rights reserved.