Package io.netty.handler.codec.http3
Class Http3RequestStreamInboundHandler
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.http3.Http3RequestStreamInboundHandler
-
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
- Direct Known Subclasses:
Http3FrameToHttpObjectCodec
public abstract class Http3RequestStreamInboundHandler extends ChannelInboundHandlerAdapter
ChannelInboundHandlerAdapter
which makes it easy to handle HTTP3 request streams.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Constructor Summary
Constructors Constructor Description Http3RequestStreamInboundHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract void
channelInputClosed(ChannelHandlerContext ctx)
Called once the input is closed and so no more inbound data is received on it.protected abstract void
channelRead(ChannelHandlerContext ctx, Http3DataFrame frame)
Called once aHttp3DataFrame
is ready for this stream to process.protected abstract void
channelRead(ChannelHandlerContext ctx, Http3HeadersFrame frame)
Called once aHttp3HeadersFrame
is ready for this stream to process.protected void
channelRead(ChannelHandlerContext ctx, Http3UnknownFrame frame)
Called once aHttp3UnknownFrame
is ready for this stream to process.void
channelRead(ChannelHandlerContext ctx, java.lang.Object msg)
CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.protected @Nullable QuicStreamChannel
controlStream(ChannelHandlerContext ctx)
Return the local control stream for this HTTP/3 connection.void
exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)
CallsChannelHandlerContext.fireExceptionCaught(Throwable)
to forward to the nextChannelHandler
in theChannelPipeline
.protected void
handleHttp3Exception(ChannelHandlerContext ctx, Http3Exception exception)
Called once aHttp3Exception
should be handled.protected void
handleQuicException(ChannelHandlerContext ctx, QuicException exception)
Called once aQuicException
should be handled.void
userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt)
CallsChannelHandlerContext.fireUserEventTriggered(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.-
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 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
-
-
-
-
Method Detail
-
channelRead
public final void channelRead(ChannelHandlerContext ctx, java.lang.Object msg) throws java.lang.Exception
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
channelRead
in interfaceChannelInboundHandler
- Overrides:
channelRead
in classChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
userEventTriggered
public void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireUserEventTriggered(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
userEventTriggered
in interfaceChannelInboundHandler
- Overrides:
userEventTriggered
in classChannelInboundHandlerAdapter
- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)
Description copied from class:ChannelInboundHandlerAdapter
CallsChannelHandlerContext.fireExceptionCaught(Throwable)
to forward to the nextChannelHandler
in theChannelPipeline
. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaught
in interfaceChannelHandler
- Specified by:
exceptionCaught
in interfaceChannelInboundHandler
- Overrides:
exceptionCaught
in classChannelInboundHandlerAdapter
-
channelRead
protected abstract void channelRead(ChannelHandlerContext ctx, Http3HeadersFrame frame) throws java.lang.Exception
Called once aHttp3HeadersFrame
is ready for this stream to process.- Parameters:
ctx
- theChannelHandlerContext
of this handler.frame
- theHttp3HeadersFrame
that was read- Throws:
java.lang.Exception
- thrown if an error happens during processing.
-
channelRead
protected abstract void channelRead(ChannelHandlerContext ctx, Http3DataFrame frame) throws java.lang.Exception
Called once aHttp3DataFrame
is ready for this stream to process.- Parameters:
ctx
- theChannelHandlerContext
of this handler.frame
- theHttp3DataFrame
that was read- Throws:
java.lang.Exception
- thrown if an error happens during processing.
-
channelInputClosed
protected abstract void channelInputClosed(ChannelHandlerContext ctx) throws java.lang.Exception
Called once the input is closed and so no more inbound data is received on it.- Parameters:
ctx
- theChannelHandlerContext
of this handler.- Throws:
java.lang.Exception
- thrown if an error happens during processing.
-
channelRead
protected void channelRead(ChannelHandlerContext ctx, Http3UnknownFrame frame)
Called once aHttp3UnknownFrame
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
- theChannelHandlerContext
of this handler.frame
- theHttp3UnknownFrame
that was read
-
handleQuicException
protected void handleQuicException(ChannelHandlerContext ctx, QuicException exception)
Called once aQuicException
should be handled.- Parameters:
ctx
- theChannelHandlerContext
of this handler.exception
- theQuicException
that caused the error.
-
handleHttp3Exception
protected void handleHttp3Exception(ChannelHandlerContext ctx, Http3Exception exception)
Called once aHttp3Exception
should be handled.- Parameters:
ctx
- theChannelHandlerContext
of this handler.exception
- theHttp3Exception
that caused the error.
-
controlStream
@Nullable protected final @Nullable QuicStreamChannel controlStream(ChannelHandlerContext ctx)
Return the local control stream for this HTTP/3 connection. This can be used to sendHttp3ControlStreamFrame
s to the remote peer.- Parameters:
ctx
- theChannelHandlerContext
of this handler.- Returns:
- the control stream.
-
-