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, DEFAULT_MAX_TIME, maxTime, 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(ObjectSizeEstimator objectSizeEstimator,
Timer timer,
long writeLimit,
long readLimit,
long checkInterval,
long maxTime) |
ChannelTrafficShapingHandler(Timer timer) |
ChannelTrafficShapingHandler(Timer timer,
long checkInterval) |
ChannelTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit) |
ChannelTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit,
long checkInterval) |
ChannelTrafficShapingHandler(Timer timer,
long writeLimit,
long readLimit,
long checkInterval,
long maxTime) |
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. |
protected void |
submitWrite(ChannelHandlerContext ctx,
MessageEvent evt,
long delay) |
configure, configure, configure, doAccounting, getCheckInterval, getMaxTimeWait, getReadLimit, getTrafficCounter, getWriteLimit, handleDownstream, internalSubmitWrite, messageReceived, releaseExternalResources, setCheckInterval, setMaxTimeWait, setReadLimit, setWriteLimit, 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, long checkInterval, long maxTime)
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, long checkInterval, long maxTime)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long writeLimit, long readLimit)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer, long checkInterval)
public ChannelTrafficShapingHandler(ObjectSizeEstimator objectSizeEstimator, Timer timer)
protected void submitWrite(ChannelHandlerContext ctx, MessageEvent evt, long delay) throws Exception
submitWrite
in class AbstractTrafficShapingHandler
Exception
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-2015 The Netty Project. All Rights Reserved.