public abstract class AbstractChannelMetricsHandler
extends io.netty.channel.ChannelDuplexHandler
ChannelHandler for collecting metrics on protocol level.| Modifier | Constructor and Description |
|---|---|
protected |
AbstractChannelMetricsHandler(SocketAddress remoteAddress,
boolean onServer) |
| Modifier and Type | Method and Description |
|---|---|
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
abstract io.netty.channel.ChannelHandler |
connectMetricsHandler() |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
abstract ChannelMetricsRecorder |
recorder() |
protected void |
recordException(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address) |
protected void |
recordRead(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address,
long bytes) |
protected void |
recordWrite(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address,
long bytes) |
abstract io.netty.channel.ChannelHandler |
tlsMetricsHandler() |
void |
write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected AbstractChannelMetricsHandler(@Nullable SocketAddress remoteAddress, boolean onServer)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx)
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterpublic void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterpublic void write(io.netty.channel.ChannelHandlerContext ctx,
Object msg,
io.netty.channel.ChannelPromise promise)
write in interface io.netty.channel.ChannelOutboundHandlerwrite in class io.netty.channel.ChannelDuplexHandlerpublic void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterpublic abstract io.netty.channel.ChannelHandler connectMetricsHandler()
public abstract io.netty.channel.ChannelHandler tlsMetricsHandler()
public abstract ChannelMetricsRecorder recorder()
protected void recordException(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address)
protected void recordRead(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address,
long bytes)
protected void recordWrite(io.netty.channel.ChannelHandlerContext ctx,
SocketAddress address,
long bytes)