public class ChannelTrafficShapingHandler extends AbstractTrafficShapingHandler
AbstractTrafficShapingHandler
is for channel
traffic shaping, that is to say a per channel limitation of the bandwidth.ExecutionHandler
(like
OrderedMemoryAwareThreadPoolExecutor
or MemoryAwareThreadPoolExecutor
).ChannelPipelineFactory
, you should create a new ChannelTrafficShapingHandler in this
ChannelPipelineFactory
each time getPipeline() method is called.ChannelHandler.Sharable
checkInterval, DEFAULT_CHECK_INTERVAL, timer, trafficCounter
Constructor and Description |
---|
ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer) |
ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long checkInterval) |
ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit) |
ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit,
long checkInterval) |
ChannelTrafficShapingHandler(Timer timer) |
ChannelTrafficShapingHandler(Timer timer,
long checkInterval) |
ChannelTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit) |
ChannelTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit,
long checkInterval) |
Modifier and Type | Method and Description |
---|---|
void |
channelClosed(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel was closed and all its related resources
were released. |
void |
channelConnected(ChannelHandlerContext ctx,
ChannelStateEvent e)
Invoked when a
Channel is open, bound to a local address, and
connected to a remote address. |
configure, configure, configure, doAccounting, getTrafficCounter, handleDownstream, messageReceived, releaseExternalResources, toString, writeRequested
bindRequested, channelBound, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
public ChannelTrafficShapingHandler(Timer timer, long writeLimit, long readLimit, long checkInterval)
public ChannelTrafficShapingHandler(Timer timer, long writeLimit, long readLimit)
public ChannelTrafficShapingHandler(Timer timer, long checkInterval)
public ChannelTrafficShapingHandler(Timer timer)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit, long checkInterval)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long checkInterval)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer)
public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandler
Channel
was closed and all its related resources
were released.channelClosed
in class SimpleChannelHandler
Exception
public void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandler
Channel
is open, bound to a local address, and
connected to a remote address.channelConnected
in class SimpleChannelHandler
Exception
Copyright © 2008-2014 The Netty Project. All Rights Reserved.