Package io.netty.handler.codec.http2
Class InboundHttpToHttp2Adapter
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.channel.ChannelInboundHandlerAdapter
-
- io.netty.handler.codec.http2.InboundHttpToHttp2Adapter
-
- All Implemented Interfaces:
ChannelHandler
,ChannelInboundHandler
@UnstableApi public class InboundHttpToHttp2Adapter extends ChannelInboundHandlerAdapter
Translates HTTP/1.x object reads into HTTP/2 frames.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private Http2Connection
connection
private Http2FrameListener
listener
-
Constructor Summary
Constructors Constructor Description InboundHttpToHttp2Adapter(Http2Connection connection, Http2FrameListener listener)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
channelRead(ChannelHandlerContext ctx, java.lang.Object msg)
CallsChannelHandlerContext.fireChannelRead(Object)
to forward to the nextChannelInboundHandler
in theChannelPipeline
.private static int
getStreamId(Http2Connection connection, HttpHeaders httpHeaders)
(package private) static void
handle(ChannelHandlerContext ctx, Http2Connection connection, Http2FrameListener listener, FullHttpMessage message)
-
Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, 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
-
connection
private final Http2Connection connection
-
listener
private final Http2FrameListener listener
-
-
Constructor Detail
-
InboundHttpToHttp2Adapter
public InboundHttpToHttp2Adapter(Http2Connection connection, Http2FrameListener listener)
-
-
Method Detail
-
getStreamId
private static int getStreamId(Http2Connection connection, HttpHeaders httpHeaders)
-
channelRead
public 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
-
handle
static void handle(ChannelHandlerContext ctx, Http2Connection connection, Http2FrameListener listener, FullHttpMessage message) throws Http2Exception
- Throws:
Http2Exception
-
-