Class Http3RequestStreamInboundHandler

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

    public abstract class Http3RequestStreamInboundHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    ChannelInboundHandlerAdapter which makes it easy to handle HTTP3 request streams.
    • 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 abstract void channelInputClosed​(io.netty.channel.ChannelHandlerContext ctx)
      Called once the input is closed and so no more inbound data is received on it.
      protected abstract void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Http3DataFrame frame)
      Called once a Http3DataFrame is ready for this stream to process.
      protected abstract void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Http3HeadersFrame frame)
      Called once a Http3HeadersFrame is ready for this stream to process.
      protected void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Http3UnknownFrame frame)
      Called once a Http3UnknownFrame is ready for this stream to process.
      void channelRead​(io.netty.channel.ChannelHandlerContext ctx, Object msg)  
      protected @Nullable io.netty.handler.codec.quic.QuicStreamChannel controlStream​(io.netty.channel.ChannelHandlerContext ctx)
      Return the local control stream for this HTTP/3 connection.
      void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)  
      protected void handleHttp3Exception​(io.netty.channel.ChannelHandlerContext ctx, Http3Exception exception)
      Called once a Http3Exception should be handled.
      protected void handleQuicException​(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.quic.QuicException exception)
      Called once a QuicException should be handled.
      void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx, Object evt)  
      • Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

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

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface io.netty.channel.ChannelHandler

        handlerAdded, handlerRemoved
    • Constructor Detail

      • Http3RequestStreamInboundHandler

        public Http3RequestStreamInboundHandler()
    • Method Detail

      • channelRead

        public final 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.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • userEventTriggered

        public void userEventTriggered​(io.netty.channel.ChannelHandlerContext ctx,
                                       Object evt)
                                throws Exception
        Specified by:
        userEventTriggered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        userEventTriggered in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
      • channelRead

        protected abstract void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                            Http3HeadersFrame frame)
                                     throws Exception
        Called once a Http3HeadersFrame is ready for this stream to process.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        frame - the Http3HeadersFrame that was read
        Throws:
        Exception - thrown if an error happens during processing.
      • channelRead

        protected abstract void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                            Http3DataFrame frame)
                                     throws Exception
        Called once a Http3DataFrame is ready for this stream to process.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        frame - the Http3DataFrame that was read
        Throws:
        Exception - thrown if an error happens during processing.
      • channelInputClosed

        protected abstract void channelInputClosed​(io.netty.channel.ChannelHandlerContext ctx)
                                            throws Exception
        Called once the input is closed and so no more inbound data is received on it.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        Throws:
        Exception - thrown if an error happens during processing.
      • channelRead

        protected void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                   Http3UnknownFrame frame)
        Called once a Http3UnknownFrame is ready for this stream to process. By default these frames are just released and so dropped on the floor as stated in the RFC. That said you may want to override this method if you use some custom frames which are not part of the main spec.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        frame - the Http3UnknownFrame that was read
      • handleQuicException

        protected void handleQuicException​(io.netty.channel.ChannelHandlerContext ctx,
                                           io.netty.handler.codec.quic.QuicException exception)
        Called once a QuicException should be handled.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        exception - the QuicException that caused the error.
      • handleHttp3Exception

        protected void handleHttp3Exception​(io.netty.channel.ChannelHandlerContext ctx,
                                            Http3Exception exception)
        Called once a Http3Exception should be handled.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        exception - the Http3Exception that caused the error.
      • controlStream

        @Nullable
        protected final @Nullable io.netty.handler.codec.quic.QuicStreamChannel controlStream​(io.netty.channel.ChannelHandlerContext ctx)
        Return the local control stream for this HTTP/3 connection. This can be used to send Http3ControlStreamFrames to the remote peer.
        Parameters:
        ctx - the ChannelHandlerContext of this handler.
        Returns:
        the control stream.