Class BaseResponseHandler

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

    public abstract class BaseResponseHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    • Nested Class Summary

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

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

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean handleBuffer​(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf, int streamId)  
      protected abstract boolean isRequestStream​(int streamId)  
      protected void onBodyPart​(io.netty.buffer.ByteBuf buf, int startOffset, int length, boolean isLastPart)  
      protected void onCompletion​(HttpRequest request)  
      protected void onData​(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf buf)  
      protected void onHeaderRead​(io.netty.buffer.ByteBuf buf, int startOfName, int endOfName, int startOfValue, int endOfValue)  
      protected void onRawData​(HttpRequest request, io.netty.buffer.ByteBuf data, boolean isLastPart)  
      protected void onStatus​(int status)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

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

        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 io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Field Detail

      • responseBytes

        protected int responseBytes
    • Constructor Detail

      • BaseResponseHandler

        public BaseResponseHandler​(HttpConnection connection)
    • Method Detail

      • handleBuffer

        protected boolean handleBuffer​(io.netty.channel.ChannelHandlerContext ctx,
                                       io.netty.buffer.ByteBuf buf,
                                       int streamId)
                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isRequestStream

        protected abstract boolean isRequestStream​(int streamId)
      • onRawData

        protected void onRawData​(HttpRequest request,
                                 io.netty.buffer.ByteBuf data,
                                 boolean isLastPart)
      • onData

        protected void onData​(io.netty.channel.ChannelHandlerContext ctx,
                              io.netty.buffer.ByteBuf buf)
      • onStatus

        protected void onStatus​(int status)
      • onHeaderRead

        protected void onHeaderRead​(io.netty.buffer.ByteBuf buf,
                                    int startOfName,
                                    int endOfName,
                                    int startOfValue,
                                    int endOfValue)
      • onBodyPart

        protected void onBodyPart​(io.netty.buffer.ByteBuf buf,
                                  int startOffset,
                                  int length,
                                  boolean isLastPart)
      • onCompletion

        protected void onCompletion​(HttpRequest request)