Class HttpServerCodec
java.lang.Object
org.jboss.netty.handler.codec.http.HttpServerCodec
- All Implemented Interfaces:
ChannelDownstreamHandler
,ChannelHandler
,ChannelUpstreamHandler
public class HttpServerCodec
extends Object
implements ChannelUpstreamHandler, ChannelDownstreamHandler
A combination of
HttpRequestDecoder
and HttpResponseEncoder
which enables easier server side HTTP implementation.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HttpRequestDecoder
private final HttpResponseEncoder
-
Constructor Summary
ConstructorsConstructorDescriptionCreates 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
Modifier and TypeMethodDescriptionvoid
Handles the specified downstream event.void
Handles the specified upstream event.
-
Field Details
-
decoder
-
encoder
-
-
Constructor Details
-
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 Details
-
handleUpstream
Description copied from interface:ChannelUpstreamHandler
Handles the specified upstream event.- Specified by:
handleUpstream
in interfaceChannelUpstreamHandler
- Parameters:
ctx
- the context object for this handlere
- the upstream event to process or intercept- Throws:
Exception
-
handleDownstream
Description copied from interface:ChannelDownstreamHandler
Handles the specified downstream event.- Specified by:
handleDownstream
in interfaceChannelDownstreamHandler
- Parameters:
ctx
- the context object for this handlere
- the downstream event to process or intercept- Throws:
Exception
-