Added default constructors with sensible default values
This commit is contained in:
parent
4e989e20d4
commit
e523b8ec0f
@ -43,7 +43,7 @@ public class HttpClientPipelineFactory implements ChannelPipelineFactory {
|
||||
public ChannelPipeline getPipeline() throws Exception {
|
||||
// Create a default pipeline implementation.
|
||||
ChannelPipeline pipeline = pipeline();
|
||||
pipeline.addLast("decoder", new HttpResponseDecoder(8192, 8192, 8192));
|
||||
pipeline.addLast("decoder", new HttpResponseDecoder());
|
||||
//pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
|
||||
pipeline.addLast("encoder", new HttpRequestEncoder());
|
||||
pipeline.addLast("handler", handler);
|
||||
|
@ -44,7 +44,7 @@ public class HttpServerPipelineFactory implements ChannelPipelineFactory {
|
||||
// Create a default pipeline implementation.
|
||||
ChannelPipeline pipeline = pipeline();
|
||||
|
||||
pipeline.addLast("decoder", new HttpRequestDecoder(8192, 8192, 8192));
|
||||
pipeline.addLast("decoder", new HttpRequestDecoder());
|
||||
//pipeline.addLast("aggregator", new HttpChunkAggregator(1048576));
|
||||
pipeline.addLast("encoder", new HttpResponseEncoder());
|
||||
pipeline.addLast("handler", handler);
|
||||
|
@ -77,8 +77,15 @@ public abstract class HttpMessageDecoder extends ReplayingDecoder<HttpMessageDec
|
||||
READ_CHUNK_FOOTER;
|
||||
}
|
||||
|
||||
protected HttpMessageDecoder(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize) {
|
||||
protected HttpMessageDecoder() {
|
||||
this(4096, 8192, 8192);
|
||||
}
|
||||
|
||||
protected HttpMessageDecoder(
|
||||
int maxInitialLineLength, int maxHeaderSize, int maxChunkSize) {
|
||||
|
||||
super(State.SKIP_CONTROL_CHARS, true);
|
||||
|
||||
if (maxInitialLineLength <= 0) {
|
||||
throw new IllegalArgumentException(
|
||||
"maxInitialLineLength must be a positive integer: " +
|
||||
|
@ -32,6 +32,10 @@ package org.jboss.netty.handler.codec.http;
|
||||
*/
|
||||
public class HttpRequestDecoder extends HttpMessageDecoder {
|
||||
|
||||
public HttpRequestDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
public HttpRequestDecoder(
|
||||
int maxInitialLineLength, int maxHeaderSize, int maxChunkSize) {
|
||||
super(maxInitialLineLength, maxHeaderSize, maxChunkSize);
|
||||
|
@ -32,6 +32,10 @@ package org.jboss.netty.handler.codec.http;
|
||||
*/
|
||||
public class HttpResponseDecoder extends HttpMessageDecoder {
|
||||
|
||||
public HttpResponseDecoder() {
|
||||
super();
|
||||
}
|
||||
|
||||
public HttpResponseDecoder(
|
||||
int maxInitialLineLength, int maxHeaderSize, int maxChunkSize) {
|
||||
super(maxInitialLineLength, maxHeaderSize, maxChunkSize);
|
||||
|
Loading…
Reference in New Issue
Block a user