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.snmp; 22 23 import openr66.protocol.configuration.Configuration; 24 25 import goldengate.snmp.interf.GgCounter32; 26 27 /** 28 * R66 Counter32 SNMP implementation 29 * 30 * @author Frederic Bregier 31 * 32 */ 33 public class R66Counter32 extends GgCounter32 { 34 35 private int type = 1; 36 private int entry = 0; 37 /** 38 * 39 */ 40 private static final long serialVersionUID = -5850987508703222927L; 41 public R66Counter32(int type, int entry) { 42 this.type = type; 43 this.entry = entry; 44 setInternalValue(); 45 } 46 public R66Counter32(int type, int entry, long value) { 47 this.type = type; 48 this.entry = entry; 49 setInternalValue(value); 50 } 51 /* (non-Javadoc) 52 * @see goldengate.snmp.interf.GgGauge32#setInternalValue() 53 */ 54 @Override 55 protected void setInternalValue() { 56 Configuration.configuration.monitoring.run(type, entry); 57 } 58 59 /* (non-Javadoc) 60 * @see goldengate.snmp.interf.GgGauge32#setInternalValue(long) 61 */ 62 @Override 63 protected void setInternalValue(long value) { 64 setValue(value); 65 } 66 67 }