1 /** 2 This file is part of GoldenGate Project (named also GoldenGate or GG). 3 4 Copyright 2009, Frederic Bregier, and individual contributors by the @author 5 tags. See the COPYRIGHT.txt in the distribution for a full listing of 6 individual contributors. 7 8 All GoldenGate Project is free software: you can redistribute it and/or 9 modify it under the terms of the GNU General Public License as published 10 by the Free Software Foundation, either version 3 of the License, or 11 (at your option) any later version. 12 13 GoldenGate is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License 19 along with GoldenGate . If not, see <http://www.gnu.org/licenses/>. 20 */ 21 package openr66.protocol.networkhandler; 22 23 import goldengate.common.logging.GgInternalLogger; 24 import goldengate.common.logging.GgInternalLoggerFactory; 25 26 import org.jboss.netty.handler.traffic.ChannelTrafficShapingHandler; 27 import org.jboss.netty.handler.traffic.TrafficCounter; 28 import org.jboss.netty.util.ObjectSizeEstimator; 29 import org.jboss.netty.util.Timer; 30 31 /** 32 * @author Frederic Bregier 33 * 34 */ 35 public class ChannelTrafficHandler extends ChannelTrafficShapingHandler { 36 /** 37 * Internal Logger 38 */ 39 private static final GgInternalLogger logger = GgInternalLoggerFactory 40 .getLogger(ChannelTrafficHandler.class); 41 /** 42 * @param objectSizeEstimator 43 * @param timer 44 * @param writeLimit 45 * @param readLimit 46 * @param checkInterval 47 */ 48 public ChannelTrafficHandler(ObjectSizeEstimator objectSizeEstimator, 49 Timer timer, long writeLimit, long readLimit, 50 long checkInterval) { 51 super(objectSizeEstimator, timer, writeLimit, readLimit, 52 checkInterval); 53 } 54 55 /* (non-Javadoc) 56 * @see org.jboss.netty.handler.traffic.AbstractTrafficShapingHandler#doAccounting(org.jboss.netty.handler.traffic.TrafficCounter) 57 */ 58 @SuppressWarnings("unused") 59 @Override 60 protected void doAccounting(TrafficCounter counter) { 61 if (false) 62 logger.debug(this.toString()+"\n {}", counter); 63 } 64 65 }