1 25 package org.jrobin.mrtg.server; 26 27 import org.jrobin.core.Util; 28 29 class RawSample { 30 private String host; 31 private String ifDescr = ""; 32 private boolean valid = true; 33 private long timestamp = Util.getTime(); 34 private long ifInOctets; 35 private long ifOutOctets; 36 private long sysUpTime; 37 private int ifOperStatus; 38 39 String getHost() { 40 return host; 41 } 42 43 void setHost(String host) { 44 this.host = host; 45 } 46 47 String getIfDescr() { 48 return ifDescr; 49 } 50 51 void setIfDescr(String ifDescr) { 52 this.ifDescr = ifDescr; 53 } 54 55 boolean isValid() { 56 return valid; 57 } 58 59 void setValid(boolean valid) { 60 this.valid = valid; 61 } 62 63 long getTimestamp() { 64 return timestamp; 65 } 66 67 void setTimestamp(long timestamp) { 68 this.timestamp = timestamp; 69 } 70 71 long getIfInOctets() { 72 return ifInOctets; 73 } 74 75 void setIfInOctets(long ifInOctets) { 76 this.ifInOctets = ifInOctets; 77 } 78 79 long getIfOutOctets() { 80 return ifOutOctets; 81 } 82 83 void setIfOutOctets(long ifOutOctets) { 84 this.ifOutOctets = ifOutOctets; 85 } 86 87 long getSysUpTime() { 88 return sysUpTime; 89 } 90 91 void setSysUpTime(long sysUpTime) { 92 this.sysUpTime = sysUpTime; 93 } 94 95 int getIfOperStatus() { 96 return ifOperStatus; 97 } 98 99 void setIfOperStatus(int ifOperStatus) { 100 this.ifOperStatus = ifOperStatus; 101 } 102 103 public String toString() { 104 return ifDescr + "@" + host + ": timestamp=" + timestamp + " valid=" + valid + 105 " ifInOctets=" + ifInOctets + " ifOutOctets=" + ifOutOctets + 106 " sysUpTime=" + sysUpTime; 107 } 108 } 109 | Popular Tags |