@ChannelHandler.Sharable public class ChannelStatistics extends io.netty.channel.ChannelDuplexHandler implements XioMetrics
Constructor and Description |
---|
ChannelStatistics(io.netty.channel.group.ChannelGroup allChannels) |
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 |
channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) |
long |
getBytesRead() |
long |
getBytesWritten() |
int |
getChannelCount() |
bind, close, connect, deregister, disconnect, flush, read, write
channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
handlerAdded, handlerRemoved, isSharable
public static final String NAME
public ChannelStatistics(io.netty.channel.group.ChannelGroup allChannels)
public void channelActive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelActive
in interface io.netty.channel.ChannelInboundHandler
channelActive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelInactive
in interface io.netty.channel.ChannelInboundHandler
channelInactive
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public int getChannelCount()
getChannelCount
in interface XioMetrics
public long getBytesRead()
getBytesRead
in interface XioMetrics
public long getBytesWritten()
getBytesWritten
in interface XioMetrics
public void channelRead(io.netty.channel.ChannelHandlerContext ctx, Object msg) throws Exception
channelRead
in interface io.netty.channel.ChannelInboundHandler
channelRead
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
public void channelReadComplete(io.netty.channel.ChannelHandlerContext ctx) throws Exception
channelReadComplete
in interface io.netty.channel.ChannelInboundHandler
channelReadComplete
in class io.netty.channel.ChannelInboundHandlerAdapter
Exception
Copyright © 2016. All Rights Reserved.