public class HttpServerPipelineConfigurator<I,O> extends AbstractHttpConfigurator implements PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>>
PipelineConfigurator
to configure the pipeline for an HTTP server. HttpRequest
object.HttpContent
objectLastHttpContent
object.HttpResponse
object.HttpContent
objectLastHttpContent
object.HttpRequestDecoder
, with the following defaults:Name | Default |
---|---|
maxInitialLineLength |
AbstractHttpConfigurator.MAX_INITIAL_LINE_LENGTH_DEFAULT |
maxHeaderSize |
AbstractHttpConfigurator.MAX_HEADER_SIZE_DEFAULT |
maxChunkSize |
AbstractHttpConfigurator.MAX_CHUNK_SIZE_DEFAULT |
validateHeaders |
AbstractHttpConfigurator.VALIDATE_HEADERS_DEFAULT |
HttpRequestDecoder
,
HttpResponseEncoder
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
HTTP_REQUEST_DECODER_HANDLER_NAME |
static java.lang.String |
HTTP_RESPONSE_ENCODER_HANDLER_NAME |
MAX_CHUNK_SIZE_DEFAULT, MAX_HEADER_SIZE_DEFAULT, MAX_INITIAL_LINE_LENGTH_DEFAULT, maxChunkSize, maxHeaderSize, maxInitialLineLength, VALIDATE_HEADERS_DEFAULT, validateHeaders
Constructor and Description |
---|
HttpServerPipelineConfigurator() |
HttpServerPipelineConfigurator(int maxInitialLineLength,
int maxChunkSize,
int maxHeaderSize) |
HttpServerPipelineConfigurator(int maxInitialLineLength,
int maxChunkSize,
int maxHeaderSize,
boolean validateHeaders) |
Modifier and Type | Method and Description |
---|---|
void |
configureNewPipeline(io.netty.channel.ChannelPipeline pipeline)
A callback to configure the passed
pipeline . |
public static final java.lang.String HTTP_REQUEST_DECODER_HANDLER_NAME
public static final java.lang.String HTTP_RESPONSE_ENCODER_HANDLER_NAME
public HttpServerPipelineConfigurator()
public HttpServerPipelineConfigurator(int maxInitialLineLength, int maxChunkSize, int maxHeaderSize)
public HttpServerPipelineConfigurator(int maxInitialLineLength, int maxChunkSize, int maxHeaderSize, boolean validateHeaders)
public void configureNewPipeline(io.netty.channel.ChannelPipeline pipeline)
PipelineConfigurator
pipeline
. This will be invoked everytime a new netty pipeline is
created, which is whenever a new channel is established.configureNewPipeline
in interface PipelineConfigurator<HttpServerRequest<I>,HttpServerResponse<O>>
pipeline
- The pipeline to configure.