Top Description Fields Constructors Methods
reactor.netty.http.client

pack-priv final Class HttpTrafficHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Imports
io.netty.channel.Channel, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, io.netty.handler.codec.http2.Http2SettingsFrame, reactor.netty.Connection, .ConnectionObserver, .NettyPipeline, reactor.netty.channel.ChannelOperations, reactor.util.Logger, .Loggers

ChannelInboundHandlerAdapter prior reactor.netty.channel.ChannelOperationsHandler for handling H2/H2C use cases. HTTP/1.x use cases are delegated to reactor.netty.channel.ChannelOperationsHandler without any interference.

Once the channel is activated, the upgrade is decided (H2C or HTTP/1.1) and in case H2/H2C the first SETTINGS frame is received, this handler is not needed any more. Thus said channelInactive(ChannelHandlerContext) is invoked only in case there are issues with the connection itself.

Author
Violeta Georgieva
Since
1.0.0

Field Summary

Modifier and TypeField and Description
pack-priv final ConnectionObserver
pack-priv static final Logger

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
pack-priv void
public void
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangedexceptionCaught

Field Detail

listenerback to summary
pack-priv final ConnectionObserver listener
logback to summary
pack-priv static final Logger log

Constructor Detail

HttpTrafficHandlerback to summary
pack-priv HttpTrafficHandler(ConnectionObserver listener)

Method Detail

channelActiveback to summary
public void channelActive(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelActive.

Implements io.netty.channel.ChannelInboundHandler.channelActive.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelActive.

Calls ChannelHandlerContext#fireChannelActive() to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
channelInactiveback to summary
public void channelInactive(ChannelHandlerContext ctx)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Implements io.netty.channel.ChannelInboundHandler.channelInactive.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelInactive.

Calls ChannelHandlerContext#fireChannelInactive() to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
channelReadback to summary
public void channelRead(ChannelHandlerContext ctx, Object msg)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Implements io.netty.channel.ChannelInboundHandler.channelRead.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.channelRead.

Calls ChannelHandlerContext#fireChannelRead(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override
sendNewStateback to summary
pack-priv void sendNewState(Connection connection, ConnectionObserver.State state)
userEventTriggeredback to summary
public void userEventTriggered(ChannelHandlerContext ctx, Object evt)

Overrides io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered.

Implements io.netty.channel.ChannelInboundHandler.userEventTriggered.

Doc from io.netty.channel.ChannelInboundHandlerAdapter.userEventTriggered.

Calls ChannelHandlerContext#fireUserEventTriggered(Object) to forward to the next ChannelInboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Annotations
@Override