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:
io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler
- Direct Known Subclasses:
Http3FrameToHttpObjectCodec
public abstract class Http3RequestStreamInboundHandler extends io.netty.channel.ChannelInboundHandlerAdapterChannelInboundHandlerAdapterwhich makes it easy to handle HTTP3 request streams.
-
-
Constructor Summary
Constructors Constructor Description Http3RequestStreamInboundHandler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidchannelInputClosed(io.netty.channel.ChannelHandlerContext ctx)Called once the input is closed and so no more inbound data is received on it.protected abstract voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Http3DataFrame frame)Called once aHttp3DataFrameis ready for this stream to process.protected abstract voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Http3HeadersFrame frame)Called once aHttp3HeadersFrameis ready for this stream to process.protected voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Http3UnknownFrame frame)Called once aHttp3UnknownFrameis ready for this stream to process.voidchannelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg)protected @Nullable io.netty.handler.codec.quic.QuicStreamChannelcontrolStream(io.netty.channel.ChannelHandlerContext ctx)Return the local control stream for this HTTP/3 connection.voidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)protected voidhandleHttp3Exception(io.netty.channel.ChannelHandlerContext ctx, Http3Exception exception)Called once aHttp3Exceptionshould be handled.protected voidhandleQuicException(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.quic.QuicException exception)Called once aQuicExceptionshould be handled.voiduserEventTriggered(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
-
-
-
-
Method Detail
-
channelRead
public final void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception- Specified by:
channelReadin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
channelReadin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
userEventTriggered
public void userEventTriggered(io.netty.channel.ChannelHandlerContext ctx, Object evt) throws Exception- Specified by:
userEventTriggeredin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
userEventTriggeredin classio.netty.channel.ChannelInboundHandlerAdapter- Throws:
Exception
-
exceptionCaught
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause)- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
-
channelRead
protected abstract void channelRead(io.netty.channel.ChannelHandlerContext ctx, Http3HeadersFrame frame) throws ExceptionCalled once aHttp3HeadersFrameis ready for this stream to process.- Parameters:
ctx- theChannelHandlerContextof this handler.frame- theHttp3HeadersFramethat was read- Throws:
Exception- thrown if an error happens during processing.
-
channelRead
protected abstract void channelRead(io.netty.channel.ChannelHandlerContext ctx, Http3DataFrame frame) throws ExceptionCalled once aHttp3DataFrameis ready for this stream to process.- Parameters:
ctx- theChannelHandlerContextof this handler.frame- theHttp3DataFramethat was read- Throws:
Exception- thrown if an error happens during processing.
-
channelInputClosed
protected abstract void channelInputClosed(io.netty.channel.ChannelHandlerContext ctx) throws ExceptionCalled once the input is closed and so no more inbound data is received on it.- Parameters:
ctx- theChannelHandlerContextof this handler.- Throws:
Exception- thrown if an error happens during processing.
-
channelRead
protected void channelRead(io.netty.channel.ChannelHandlerContext ctx, Http3UnknownFrame frame)Called once aHttp3UnknownFrameis 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- theChannelHandlerContextof this handler.frame- theHttp3UnknownFramethat was read
-
handleQuicException
protected void handleQuicException(io.netty.channel.ChannelHandlerContext ctx, io.netty.handler.codec.quic.QuicException exception)Called once aQuicExceptionshould be handled.- Parameters:
ctx- theChannelHandlerContextof this handler.exception- theQuicExceptionthat caused the error.
-
handleHttp3Exception
protected void handleHttp3Exception(io.netty.channel.ChannelHandlerContext ctx, Http3Exception exception)Called once aHttp3Exceptionshould be handled.- Parameters:
ctx- theChannelHandlerContextof this handler.exception- theHttp3Exceptionthat 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 sendHttp3ControlStreamFrames to the remote peer.- Parameters:
ctx- theChannelHandlerContextof this handler.- Returns:
- the control stream.
-
-