Class BasicHttpObjectAggregator

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
    Direct Known Subclasses:
    BasicHttpNonMultiPartAggregator

    public class BasicHttpObjectAggregator
    extends io.netty.handler.codec.http.HttpObjectAggregator
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

        io.netty.channel.ChannelHandler.Sharable
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void aggregate​(io.netty.handler.codec.http.FullHttpMessage aggregated, io.netty.handler.codec.http.HttpContent content)  
      protected io.netty.handler.codec.http.FullHttpMessage beginAggregation​(io.netty.handler.codec.http.HttpMessage start, io.netty.buffer.ByteBuf content)  
      protected void handleOversizedMessage​(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.http.HttpMessage oversized)  
      protected java.lang.Object newContinueResponse​(io.netty.handler.codec.http.HttpMessage start, int maxContentLength, io.netty.channel.ChannelPipeline pipeline)  
      • Methods inherited from class io.netty.handler.codec.http.HttpObjectAggregator

        closeAfterContinueResponse, finishAggregation, ignoreContentAfterContinueResponse, isAggregated, isContentLengthInvalid, isContentMessage, isLastContentMessage, isStartMessage
      • Methods inherited from class io.netty.handler.codec.MessageAggregator

        acceptInboundMessage, channelInactive, channelReadComplete, ctx, decode, handlerAdded, handlerRemoved, isHandlingOversizedMessage, maxContentLength, maxCumulationBufferComponents, setMaxCumulationBufferComponents
      • Methods inherited from class io.netty.handler.codec.MessageToMessageDecoder

        channelRead
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

        channelActive, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class io.netty.channel.ChannelHandlerAdapter

        ensureNotSharable, isSharable
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BasicHttpObjectAggregator

        public BasicHttpObjectAggregator​(int maxContentLength,
                                         boolean closeOnExpectationFailed)
        Creates a new instance.
        Parameters:
        maxContentLength - the maximum length of the aggregated content in bytes. If the length of the aggregated content exceeds this value, handleOversizedMessage(io.netty.channel.ChannelHandlerContext, HttpMessage) will be called.
        closeOnExpectationFailed - If a 100-continue response is detected but the content length is too large then true means close the connection. otherwise the connection will remain open and data will be
    • Method Detail

      • newContinueResponse

        protected java.lang.Object newContinueResponse​(io.netty.handler.codec.http.HttpMessage start,
                                                       int maxContentLength,
                                                       io.netty.channel.ChannelPipeline pipeline)
        Overrides:
        newContinueResponse in class io.netty.handler.codec.http.HttpObjectAggregator
      • handleOversizedMessage

        protected void handleOversizedMessage​(io.netty.channel.ChannelHandlerContext ctx,
                                              io.netty.handler.codec.http.HttpMessage oversized)
                                       throws java.lang.Exception
        Overrides:
        handleOversizedMessage in class io.netty.handler.codec.http.HttpObjectAggregator
        Throws:
        java.lang.Exception
      • beginAggregation

        protected io.netty.handler.codec.http.FullHttpMessage beginAggregation​(io.netty.handler.codec.http.HttpMessage start,
                                                                               io.netty.buffer.ByteBuf content)
                                                                        throws java.lang.Exception
        Overrides:
        beginAggregation in class io.netty.handler.codec.http.HttpObjectAggregator
        Throws:
        java.lang.Exception
      • aggregate

        protected void aggregate​(io.netty.handler.codec.http.FullHttpMessage aggregated,
                                 io.netty.handler.codec.http.HttpContent content)
                          throws java.lang.Exception
        Overrides:
        aggregate in class io.netty.handler.codec.http.HttpObjectAggregator
        Throws:
        java.lang.Exception