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