Class RouterRequestHttpHandler

  • All Implemented Interfaces:,

    public class RouterRequestHttpHandler
    Monitors the stream, when it gets enough bytes that form a genuine object, it deserializes the object and passes it along the stack. SimpleChannelInboundHandler.channelRead(ChannelHandlerContext, Object) will release the incoming request object: FullHttpRequest for each request. The downstream handler is not expected to use this object any more.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface
    • Constructor Summary

      Constructor Description
      RouterRequestHttpHandler​(StatsHandler handler, java.util.Map<java.lang.String,​java.lang.Integer> storeToEarlyTerminationThresholdMSMap)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void channelRead0​( ctx, io.netty.handler.codec.http.FullHttpRequest req)  
      void channelReadComplete​( ctx)  
      void exceptionCaught​( ctx, java.lang.Throwable cause)  
      void userEventTriggered​( ctx, java.lang.Object evt)
      This function is used to support http keep-alive.
      • Methods inherited from class

        acceptInboundMessage, channelRead
      • Methods inherited from class

        channelActive, channelInactive, channelRegistered, channelUnregistered, channelWritabilityChanged
      • Methods inherited from class

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

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface

        handlerAdded, handlerRemoved
    • Constructor Detail

      • RouterRequestHttpHandler

        public RouterRequestHttpHandler​(StatsHandler handler,
                                        java.util.Map<java.lang.String,​java.lang.Integer> storeToEarlyTerminationThresholdMSMap)
    • Method Detail

      • exceptionCaught

        public void exceptionCaught​( ctx,
                                    java.lang.Throwable cause)
        Specified by:
        exceptionCaught in interface
        Specified by:
        exceptionCaught in interface
        exceptionCaught in class
      • channelReadComplete

        public void channelReadComplete​( ctx)
        Specified by:
        channelReadComplete in interface
        channelReadComplete in class
      • channelRead0

        protected void channelRead0​( ctx,
                                    io.netty.handler.codec.http.FullHttpRequest req)
                             throws java.lang.Exception
        Specified by:
        channelRead0 in class<io.netty.handler.codec.http.FullHttpRequest>
      • userEventTriggered

        public void userEventTriggered​( ctx,
                                       java.lang.Object evt)
                                throws java.lang.Exception
        This function is used to support http keep-alive. For now, the connection will keep open if the idle time is less than the configured threshold, we might need to consider to close it after a long period of time, such as 12 hours.
        Specified by:
        userEventTriggered in interface
        userEventTriggered in class
        ctx -
        evt -