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 |
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) |
void |
write(ChannelHandlerContext ctx,
Object msg,
ChannelPromise promise) |
bind, close, connect, deregister, disconnect, flush, readchannelActive, channelInactive, channelReadComplete, 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 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 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)