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
ChannelInboundHandlerAdapterwhich 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 voidchannelInputClosed(ChannelHandlerContext ctx)Called once the input is closed and so no more inbound data is received on it.protected abstract voidchannelRead(ChannelHandlerContext ctx, Http3DataFrame frame)Called once aHttp3DataFrameis ready for this stream to process.protected abstract voidchannelRead(ChannelHandlerContext ctx, Http3HeadersFrame frame)Called once aHttp3HeadersFrameis ready for this stream to process.protected voidchannelRead(ChannelHandlerContext ctx, Http3UnknownFrame frame)Called once aHttp3UnknownFrameis ready for this stream to process.voidchannelRead(ChannelHandlerContext ctx, java.lang.Object msg)CallsChannelHandlerContext.fireChannelRead(Object)to forward to the nextChannelInboundHandlerin theChannelPipeline.protected @Nullable QuicStreamChannelcontrolStream(ChannelHandlerContext ctx)Return the local control stream for this HTTP/3 connection.voidexceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)CallsChannelHandlerContext.fireExceptionCaught(Throwable)to forward to the nextChannelHandlerin theChannelPipeline.protected voidhandleHttp3Exception(ChannelHandlerContext ctx, Http3Exception exception)Called once aHttp3Exceptionshould be handled.protected voidhandleQuicException(ChannelHandlerContext ctx, QuicException exception)Called once aQuicExceptionshould be handled.voiduserEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt)CallsChannelHandlerContext.fireUserEventTriggered(Object)to forward to the nextChannelInboundHandlerin 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:ChannelInboundHandlerAdapterCallsChannelHandlerContext.fireChannelRead(Object)to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
channelReadin interfaceChannelInboundHandler- Overrides:
channelReadin classChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
userEventTriggered
public void userEventTriggered(ChannelHandlerContext ctx, java.lang.Object evt) throws java.lang.Exception
Description copied from class:ChannelInboundHandlerAdapterCallsChannelHandlerContext.fireUserEventTriggered(Object)to forward to the nextChannelInboundHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
userEventTriggeredin interfaceChannelInboundHandler- Overrides:
userEventTriggeredin classChannelInboundHandlerAdapter- Throws:
java.lang.Exception
-
exceptionCaught
public void exceptionCaught(ChannelHandlerContext ctx, java.lang.Throwable cause)
Description copied from class:ChannelInboundHandlerAdapterCallsChannelHandlerContext.fireExceptionCaught(Throwable)to forward to the nextChannelHandlerin theChannelPipeline. Sub-classes may override this method to change behavior.- Specified by:
exceptionCaughtin interfaceChannelHandler- Specified by:
exceptionCaughtin interfaceChannelInboundHandler- Overrides:
exceptionCaughtin classChannelInboundHandlerAdapter
-
channelRead
protected abstract void channelRead(ChannelHandlerContext ctx, Http3HeadersFrame frame) throws java.lang.Exception
Called once aHttp3HeadersFrameis ready for this stream to process.- Parameters:
ctx- theChannelHandlerContextof this handler.frame- theHttp3HeadersFramethat 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 aHttp3DataFrameis ready for this stream to process.- Parameters:
ctx- theChannelHandlerContextof this handler.frame- theHttp3DataFramethat 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- theChannelHandlerContextof this handler.- Throws:
java.lang.Exception- thrown if an error happens during processing.
-
channelRead
protected void channelRead(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(ChannelHandlerContext ctx, QuicException exception)
Called once aQuicExceptionshould be handled.- Parameters:
ctx- theChannelHandlerContextof this handler.exception- theQuicExceptionthat caused the error.
-
handleHttp3Exception
protected void handleHttp3Exception(ChannelHandlerContext ctx, Http3Exception exception)
Called once aHttp3Exceptionshould be handled.- Parameters:
ctx- theChannelHandlerContextof this handler.exception- theHttp3Exceptionthat 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 sendHttp3ControlStreamFrames to the remote peer.- Parameters:
ctx- theChannelHandlerContextof this handler.- Returns:
- the control stream.
-
-