Class HttpServerCodec
- java.lang.Object
-
- org.jboss.netty.handler.codec.http.HttpServerCodec
-
- All Implemented Interfaces:
ChannelDownstreamHandler,ChannelHandler,ChannelUpstreamHandler
public class HttpServerCodec extends java.lang.Object implements ChannelUpstreamHandler, ChannelDownstreamHandler
A combination ofHttpRequestDecoderandHttpResponseEncoderwhich enables easier server side HTTP implementation.- See Also:
HttpClientCodec
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private HttpRequestDecoderdecoderprivate HttpResponseEncoderencoder
-
Constructor Summary
Constructors Constructor Description HttpServerCodec()Creates a new instance with the default decoder options (maxInitialLineLength (4096},maxHeaderSize (8192), andmaxChunkSize (8192)).HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize)Creates a new instance with the specified decoder options.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidhandleDownstream(ChannelHandlerContext ctx, ChannelEvent e)Handles the specified downstream event.voidhandleUpstream(ChannelHandlerContext ctx, ChannelEvent e)Handles the specified upstream event.
-
-
-
Field Detail
-
decoder
private final HttpRequestDecoder decoder
-
encoder
private final HttpResponseEncoder encoder
-
-
Constructor Detail
-
HttpServerCodec
public HttpServerCodec()
Creates a new instance with the default decoder options (maxInitialLineLength (4096},maxHeaderSize (8192), andmaxChunkSize (8192)).
-
HttpServerCodec
public HttpServerCodec(int maxInitialLineLength, int maxHeaderSize, int maxChunkSize)Creates a new instance with the specified decoder options.
-
-
Method Detail
-
handleUpstream
public void handleUpstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
Description copied from interface:ChannelUpstreamHandlerHandles the specified upstream event.- Specified by:
handleUpstreamin interfaceChannelUpstreamHandler- Parameters:
ctx- the context object for this handlere- the upstream event to process or intercept- Throws:
java.lang.Exception
-
handleDownstream
public void handleDownstream(ChannelHandlerContext ctx, ChannelEvent e) throws java.lang.Exception
Description copied from interface:ChannelDownstreamHandlerHandles the specified downstream event.- Specified by:
handleDownstreamin interfaceChannelDownstreamHandler- Parameters:
ctx- the context object for this handlere- the downstream event to process or intercept- Throws:
java.lang.Exception
-
-