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$, $Date$
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, executor, trafficCounter
 
Constructor Summary
GlobalTrafficShapingHandler(Executor executor)
           
GlobalTrafficShapingHandler(Executor executor, long checkInterval)
           
GlobalTrafficShapingHandler(Executor executor, long writeLimit, long readLimit)
           
GlobalTrafficShapingHandler(Executor executor, long writeLimit, long readLimit, long checkInterval)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, Executor executor)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, Executor executor, long checkInterval)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, Executor executor, long writeLimit, long readLimit)
           
GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator, Executor executor, long writeLimit, long readLimit, long checkInterval)
           
 
Method Summary
 
Methods inherited from class org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler
configure, configure, configure, doAccounting, getTrafficCounter, handleDownstream, hasLimit, 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(Executor executor,
                                   long writeLimit,
                                   long readLimit,
                                   long checkInterval)
Parameters:
executor -
writeLimit -
readLimit -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(Executor executor,
                                   long writeLimit,
                                   long readLimit)
Parameters:
executor -
writeLimit -
readLimit -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(Executor executor,
                                   long checkInterval)
Parameters:
executor -
checkInterval -

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(Executor executor)
Parameters:
executor -

GlobalTrafficShapingHandler

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

GlobalTrafficShapingHandler

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

GlobalTrafficShapingHandler

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

GlobalTrafficShapingHandler

public GlobalTrafficShapingHandler(org.jboss.netty.util.ObjectSizeEstimator objectSizeEstimator,
                                   Executor executor)
Parameters:
objectSizeEstimator -
executor -


Copyright © 2011. All Rights Reserved.