org.jboss.netty.handler.codec.http
类 HttpChunkAggregator

java.lang.Object
  继承者 org.jboss.netty.channel.SimpleChannelUpstreamHandler
      继承者 org.jboss.netty.handler.codec.http.HttpChunkAggregator
所有已实现的接口:
ChannelHandler, ChannelUpstreamHandler

public class HttpChunkAggregator
extends 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());
 


嵌套类摘要
 
从接口 org.jboss.netty.channel.ChannelHandler 继承的嵌套类/接口
ChannelHandler.Sharable
 
构造方法摘要
HttpChunkAggregator(int maxContentLength)
          Creates a new instance.
 
方法摘要
 void messageReceived(ChannelHandlerContext ctx, MessageEvent e)
          当一个从远端发来的消息对象(如: ChannelBuffer)被接收时调用.
 
从类 org.jboss.netty.channel.SimpleChannelUpstreamHandler 继承的方法
channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, exceptionCaught, handleUpstream, writeComplete
 
从类 java.lang.Object 继承的方法
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

HttpChunkAggregator

public HttpChunkAggregator(int maxContentLength)
Creates a new instance.

参数:
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(ChannelHandlerContext ctx,
                            MessageEvent e)
                     throws java.lang.Exception
从类 SimpleChannelUpstreamHandler 复制的描述
当一个从远端发来的消息对象(如: ChannelBuffer)被接收时调用.

覆盖:
SimpleChannelUpstreamHandler 中的 messageReceived
抛出:
java.lang.Exception