2 * This Java file has been generated by smidump 0.4.5. Do not edit!
3 * It is intended to be used within a Java AgentX sub-agent environment.
5 * $Id: ProtocolDistStatsTable.java 4432 2006-05-29 16:21:11Z strauss $
9 This class represents a Java AgentX (JAX) implementation of
10 the table protocolDistStatsTable defined in RMON2-MIB.
17 import java.util.Vector;
20 import jax.AgentXVarBind;
21 import jax.AgentXResponsePDU;
22 import jax.AgentXSetPhase;
23 import jax.AgentXTable;
24 import jax.AgentXEntry;
26 public class ProtocolDistStatsTable extends AgentXTable
30 private final static long[] OID = {1, 3, 6, 1, 2, 1, 16, 12, 2, 1};
33 public ProtocolDistStatsTable()
35 oid = new AgentXOID(OID);
37 // register implemented columns
38 columns.addElement(new Long(1));
39 columns.addElement(new Long(2));
42 public ProtocolDistStatsTable(boolean shared)
46 oid = new AgentXOID(OID);
48 // register implemented columns
49 columns.addElement(new Long(1));
50 columns.addElement(new Long(2));
53 public AgentXVarBind getVarBind(AgentXEntry entry, long column)
55 AgentXOID oid = new AgentXOID(getOID(), column, entry.getInstance());
57 switch ((int)column) {
58 case 1: // protocolDistStatsPkts
60 long value = ((ProtocolDistStatsEntry)entry).get_protocolDistStatsPkts();
61 return new AgentXVarBind(oid, AgentXVarBind.GAUGE32, value);
63 case 2: // protocolDistStatsOctets
65 long value = ((ProtocolDistStatsEntry)entry).get_protocolDistStatsOctets();
66 return new AgentXVarBind(oid, AgentXVarBind.GAUGE32, value);
73 public int setEntry(AgentXSetPhase phase,
79 switch ((int)column) {
82 return AgentXResponsePDU.NOT_WRITABLE;