Top Description Inners Fields Constructors Methods
reactor.netty.channel

public Class ChannelMetricsHandler

extends AbstractChannelMetricsHandler
Class Inheritance
Imports
io.netty.channel.ChannelHandler, .ChannelHandlerContext, .ChannelInboundHandlerAdapter, .ChannelOutboundHandlerAdapter, .ChannelPromise, io.netty.handler.ssl.SniCompletionEvent, .SslHandler, reactor.util.annotation.Nullable, java.net.SocketAddress, java.time.Duration

ChannelHandler for collecting metrics on protocol level.
Author
Violeta Georgieva

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final ChannelMetricsRecorder
Inherited from reactor.netty.channel.AbstractChannelMetricsHandler:
channelOpenedonServerremoteAddress

Constructor Summary

AccessConstructor and Description
pack-priv
ChannelMetricsHandler(ChannelMetricsRecorder recorder, SocketAddress remoteAddress, boolean onServer)

Method Summary

Modifier and TypeMethod and Description
public ChannelHandler
public ChannelMetricsRecorder
public ChannelHandler
Inherited from reactor.netty.channel.AbstractChannelMetricsHandler:
channelActivechannelInactivechannelReadchannelRegisteredexceptionCaughtrecordExceptionrecordReadrecordWritewrite

Field Detail

recorderback to summary
pack-priv final ChannelMetricsRecorder recorder

Constructor Detail

ChannelMetricsHandlerback to summary
pack-priv ChannelMetricsHandler(ChannelMetricsRecorder recorder, SocketAddress remoteAddress, boolean onServer)

Method Detail

connectMetricsHandlerback to summary
public ChannelHandler connectMetricsHandler()

Implements abstract reactor.netty.channel.AbstractChannelMetricsHandler.connectMetricsHandler.

Annotations
@Override
recorderback to summary
public ChannelMetricsRecorder recorder()

Implements abstract reactor.netty.channel.AbstractChannelMetricsHandler.recorder.

Annotations
@Override
tlsMetricsHandlerback to summary
public ChannelHandler tlsMetricsHandler()

Implements abstract reactor.netty.channel.AbstractChannelMetricsHandler.tlsMetricsHandler.

Annotations
@Override
reactor.netty.channel back to summary

pack-priv final Class ChannelMetricsHandler.ConnectMetricsHandler

extends ChannelOutboundHandlerAdapter
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final ChannelMetricsRecorder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
connect(ChannelHandlerContext
the ChannelHandlerContext for which the connect operation is made
ctx
,
SocketAddress
the SocketAddress to which it should connect
remoteAddress
,
SocketAddress
the SocketAddress which is used as source on connect
localAddress
,
ChannelPromise
the ChannelPromise to notify once the operation completes
promise
)

Overrides io.netty.channel.ChannelOutboundHandlerAdapter.connect.

Implements io.netty.channel.ChannelOutboundHandler.connect.

Calls ChannelHandlerContext#connect(SocketAddress, SocketAddress, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline.
Inherited from io.netty.channel.ChannelOutboundHandlerAdapter:
bindclosederegisterdisconnectflushreadwrite

Field Detail

recorderback to summary
pack-priv final ChannelMetricsRecorder recorder

Constructor Detail

ConnectMetricsHandlerback to summary
pack-priv ConnectMetricsHandler(ChannelMetricsRecorder recorder)

Method Detail

connectback to summary
public void connect(ChannelHandlerContext ctx, SocketAddress remoteAddress, SocketAddress localAddress, ChannelPromise promise) throws Exception

Overrides io.netty.channel.ChannelOutboundHandlerAdapter.connect.

Implements io.netty.channel.ChannelOutboundHandler.connect.

Doc from io.netty.channel.ChannelOutboundHandlerAdapter.connect.

Calls ChannelHandlerContext#connect(SocketAddress, SocketAddress, ChannelPromise) to forward to the next ChannelOutboundHandler in the ChannelPipeline. Sub-classes may override this method to change behavior.

Parameters
ctx:ChannelHandlerContext

Doc from io.netty.channel.ChannelOutboundHandler.connect.

the ChannelHandlerContext for which the connect operation is made

remoteAddress:SocketAddress

Doc from io.netty.channel.ChannelOutboundHandler.connect.

the SocketAddress to which it should connect

localAddress:SocketAddress

Doc from io.netty.channel.ChannelOutboundHandler.connect.

the SocketAddress which is used as source on connect

promise:ChannelPromise

Doc from io.netty.channel.ChannelOutboundHandler.connect.

the ChannelPromise to notify once the operation completes

Annotations
@Override
Exceptions
Exception:

Doc from io.netty.channel.ChannelOutboundHandler.connect.

thrown if an error occurs

reactor.netty.channel back to summary

pack-priv Class ChannelMetricsHandler.TlsMetricsHandler

extends ChannelInboundHandlerAdapter
Class Inheritance
Known Direct Subclasses
reactor.netty.channel.ContextAwareChannelMetricsHandler.TlsMetricsHandler

Field Summary

Modifier and TypeField and Description
pack-priv boolean
protected final ChannelMetricsRecorder

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private void
public void
protected void
recordTlsHandshakeTime(ChannelHandlerContext ctx, long tlsHandshakeTimeStart, String status)

public void
Inherited from io.netty.channel.ChannelInboundHandlerAdapter:
channelInactivechannelReadchannelReadCompletechannelRegisteredchannelUnregisteredchannelWritabilityChangedexceptionCaught

Field Detail

listenerAddedback to summary
pack-priv boolean listenerAdded
recorderback to summary
protected final ChannelMetricsRecorder recorder

Constructor Detail

TlsMetricsHandlerback to summary
pack-priv TlsMetricsHandler(ChannelMetricsRecorder recorder)

Method Detail

addListenerback to summary
private void addListener(ChannelHandlerContext ctx)
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
recordTlsHandshakeTimeback to summary
protected void recordTlsHandshakeTime(ChannelHandlerContext ctx, long tlsHandshakeTimeStart, String status)
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