Class Netty4HttpAggregator

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.handler.codec.MessageToMessageDecoder<io.netty.handler.codec.http.HttpObject>
io.netty.handler.codec.MessageAggregator<io.netty.handler.codec.http.HttpObject,io.netty.handler.codec.http.HttpMessage,io.netty.handler.codec.http.HttpContent,io.netty.handler.codec.http.FullHttpMessage>
io.netty.handler.codec.http.HttpObjectAggregator
org.elasticsearch.http.netty4.Netty4HttpAggregator
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler

public class Netty4HttpAggregator extends io.netty.handler.codec.http.HttpObjectAggregator
A wrapper around HttpObjectAggregator. Provides optional content aggregation based on predicate. HttpObjectAggregator also handles Expect: 100-continue and oversized content. Provides content size handling for non-aggregated requests too.
  • Nested Class Summary

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

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

    Constructors
    Constructor
    Description
    Netty4HttpAggregator(int maxContentLength, Predicate<HttpPreRequest> decider, io.netty.handler.codec.http.HttpRequestDecoder decoder)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     

    Methods inherited from class io.netty.handler.codec.http.HttpObjectAggregator

    aggregate, beginAggregation, closeAfterContinueResponse, finishAggregation, handleOversizedMessage, ignoreContentAfterContinueResponse, isAggregated, isContentLengthInvalid, isContentMessage, isLastContentMessage, isStartMessage, newContinueResponse

    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.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 Details

    • Netty4HttpAggregator

      public Netty4HttpAggregator(int maxContentLength, Predicate<HttpPreRequest> decider, io.netty.handler.codec.http.HttpRequestDecoder decoder)
  • Method Details

    • channelRead

      public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
      Specified by:
      channelRead in interface io.netty.channel.ChannelInboundHandler
      Overrides:
      channelRead in class io.netty.handler.codec.MessageToMessageDecoder<io.netty.handler.codec.http.HttpObject>
      Throws:
      Exception