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