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.SharablecheckInterval, 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, writeRequestedbindRequested, channelBound, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleUpstream, setInterestOpsRequested, unbindRequested, writeCompletepublic 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 AbstractTrafficShapingHandlerExceptionpublic void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandlerChannel was closed and all its related resources
were released.channelClosed in class SimpleChannelHandlerExceptionpublic void channelConnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception
SimpleChannelHandlerChannel is open, bound to a local address, and
connected to a remote address.channelConnected in class SimpleChannelHandlerExceptionCopyright © 2008-2015 The Netty Project. All Rights Reserved.