org.jboss.netty.handler.codec.http2
Class HttpChunkAggregator
java.lang.Object
org.jboss.netty.channel.SimpleChannelUpstreamHandler
org.jboss.netty.handler.codec.http2.HttpChunkAggregator
- All Implemented Interfaces:
- org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler
public class HttpChunkAggregator
- extends org.jboss.netty.channel.SimpleChannelUpstreamHandler
A ChannelHandler that aggregates an HttpMessage
and its following HttpChunks into a single HttpMessage with
no following HttpChunks. It is useful when you don't want to take
care of HTTP messages whose transfer encoding is 'chunked'. Insert this
handler after HttpMessageDecoder in the ChannelPipeline:
ChannelPipeline p = ...;
...
p.addLast("decoder", new HttpRequestDecoder());
p.addLast("aggregator", new HttpChunkAggregator(1048576));
...
p.addLast("encoder", new HttpResponseEncoder());
p.addLast("handler", new HttpRequestHandler());
- Version:
- $Rev: 1107 $, $Date: 2012-04-15 19:00:57 +0200 (dim., 15 avr. 2012) $
- Author:
- The Netty Project, Trustin Lee
| Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler |
org.jboss.netty.channel.ChannelHandler.Sharable |
|
Method Summary |
void |
messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
|
| Methods inherited from class org.jboss.netty.channel.SimpleChannelUpstreamHandler |
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, writeComplete |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpChunkAggregator
public HttpChunkAggregator(int maxContentLength)
- Creates a new instance.
- Parameters:
maxContentLength - the maximum length of the aggregated content.
If the length of the aggregated content exceeds this value,
a TooLongFrameException will be raised.
messageReceived
public void messageReceived(org.jboss.netty.channel.ChannelHandlerContext ctx,
org.jboss.netty.channel.MessageEvent e)
throws Exception
- Overrides:
messageReceived in class org.jboss.netty.channel.SimpleChannelUpstreamHandler
- Throws:
Exception
Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.