org.jboss.netty.handler.traffic
Class GlobalTrafficShapingHandler

java.lang.Object
  extended by org.jboss.netty.channel.SimpleChannelHandler
      extended by org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler
          extended by org.jboss.netty.handler.traffic.GlobalTrafficShapingHandler
All Implemented Interfaces:
org.jboss.netty.channel.ChannelDownstreamHandler, org.jboss.netty.channel.ChannelHandler, org.jboss.netty.channel.ChannelUpstreamHandler, org.jboss.netty.util.ExternalResourceReleasable

@ChannelHandler.Sharable
public class GlobalTrafficShapingHandler
extends AbstractTrafficShapingHandler

This implementation of the AbstractTrafficShapingHandler is for global traffic shaping, that is to say a global limitation of the bandwidth, whatever the number of opened channels.

The general use should be as follow:


Version:
$Rev: 1225 $, $Date: 2012-05-20 10:48:53 +0200 (dim., 20 mai 2012) $
Author:
The Netty Project (netty-dev@lists.jboss.org), Frederic Bregier

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.netty.channel.ChannelHandler
org.jboss.netty.channel.ChannelHandler.Sharable
 
Field Summary
 
Fields inherited from class org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler
checkInterval, DEFAULT_CHECK_INTERVAL, timer, trafficCounter
 
Constructor Summary
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, org.jboss.netty.util.Timer timer)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, org.jboss.netty.util.Timer timer, long checkInterval)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, org.jboss.netty.util.Timer timer, long writeLimit, long readLimit)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, org.jboss.netty.util.Timer timer, long writeLimit, long readLimit, long checkInterval)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer, long checkInterval)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer, long writeLimit, long readLimit)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer, long writeLimit, long readLimit, long checkInterval)
           
 
Method Summary
 
Methods inherited from class org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler
configure, configure, configure, doAccounting, getTrafficCounter, handleDownstream, messageReceived, releaseExternalResources, toString, writeRequested
 
Methods inherited from class org.jboss.netty.channel.SimpleChannelHandler
bindRequested, channelBound, channelClosed, channelConnected, channelDisconnected, channelInterestChanged, channelOpen, channelUnbound, childChannelClosed, childChannelOpen, closeRequested, connectRequested, disconnectRequested, exceptionCaught, handleUpstream, setInterestOpsRequested, unbindRequested, writeComplete
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer,
                                   long writeLimit,
                                   long readLimit,
                                   long checkInterval)
Parameters:
timer -
writeLimit -
readLimit -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer,
                                   long writeLimit,
                                   long readLimit)
Parameters:
timer -
writeLimit -
readLimit -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer,
                                   long checkInterval)
Parameters:
timer -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.Timer timer)
Parameters:
timer -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator,
                                   org.jboss.netty.util.Timer timer,
                                   long writeLimit,
                                   long readLimit,
                                   long checkInterval)
Parameters:
objectSizeEstimator -
timer -
writeLimit -
readLimit -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator,
                                   org.jboss.netty.util.Timer timer,
                                   long writeLimit,
                                   long readLimit)
Parameters:
objectSizeEstimator -
timer -
writeLimit -
readLimit -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator,
                                   org.jboss.netty.util.Timer timer,
                                   long checkInterval)
Parameters:
objectSizeEstimator -
timer -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator,
                                   org.jboss.netty.util.Timer timer)
Parameters:
objectSizeEstimator -
timer -


Copyright © 2009-2012 Frederic Bregier. All Rights Reserved.