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: AddressMap.java 4432 2006-05-29 16:21:11Z strauss $
9 This class represents a Java AgentX (JAX) implementation of
10 the scalar group addressMap defined in RMON2-MIB.
14 @see AgentXGroup, AgentXScalars
17 import java.util.Vector;
18 import java.util.Enumeration;
20 import jax.AgentXVarBind;
21 import jax.AgentXSetPhase;
22 import jax.AgentXResponsePDU;
23 import jax.AgentXScalars;
25 public class AddressMap extends AgentXScalars
28 private final static long[] AddressMapOID = {1, 3, 6, 1, 2, 1, 16, 13};
30 protected AgentXOID AddressMapInsertsOID;
31 protected final static long[] AddressMapInsertsName = {1, 3, 6, 1, 2, 1, 16, 13, 1, 0};
32 protected long addressMapInserts = 0;
33 protected AgentXOID AddressMapDeletesOID;
34 protected final static long[] AddressMapDeletesName = {1, 3, 6, 1, 2, 1, 16, 13, 2, 0};
35 protected long addressMapDeletes = 0;
36 protected AgentXOID AddressMapMaxDesiredEntriesOID;
37 protected final static long[] AddressMapMaxDesiredEntriesName = {1, 3, 6, 1, 2, 1, 16, 13, 3, 0};
38 protected int addressMapMaxDesiredEntries = 0;
39 protected int undo_addressMapMaxDesiredEntries = 0;
42 oid = new AgentXOID(AddressMapOID);
44 AddressMapInsertsOID = new AgentXOID(AddressMapInsertsName);
45 data.addElement(AddressMapInsertsOID);
46 AddressMapDeletesOID = new AgentXOID(AddressMapDeletesName);
47 data.addElement(AddressMapDeletesOID);
48 AddressMapMaxDesiredEntriesOID = new AgentXOID(AddressMapMaxDesiredEntriesName);
49 data.addElement(AddressMapMaxDesiredEntriesOID);
52 public long get_addressMapInserts()
54 return addressMapInserts;
57 public long get_addressMapDeletes()
59 return addressMapDeletes;
62 public int get_addressMapMaxDesiredEntries()
64 return addressMapMaxDesiredEntries;
67 public int set_addressMapMaxDesiredEntries(AgentXSetPhase phase, int value)
69 switch (phase.getPhase()) {
70 case AgentXSetPhase.TEST_SET:
72 case AgentXSetPhase.COMMIT:
73 undo_addressMapMaxDesiredEntries = addressMapMaxDesiredEntries;
74 addressMapMaxDesiredEntries = value;
76 case AgentXSetPhase.UNDO:
77 addressMapMaxDesiredEntries = undo_addressMapMaxDesiredEntries;
79 case AgentXSetPhase.CLEANUP:
82 return AgentXResponsePDU.PROCESSING_ERROR;
84 return AgentXResponsePDU.NO_ERROR;
86 public AgentXVarBind getScalar(AgentXOID pos, AgentXOID oid)
88 if ((pos == null) || (pos.compareTo(oid) != 0))
89 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
91 if (pos == AddressMapInsertsOID)
92 return new AgentXVarBind(oid, AgentXVarBind.COUNTER32,
93 get_addressMapInserts());
94 if (pos == AddressMapDeletesOID)
95 return new AgentXVarBind(oid, AgentXVarBind.COUNTER32,
96 get_addressMapDeletes());
97 if (pos == AddressMapMaxDesiredEntriesOID)
98 return new AgentXVarBind(oid, AgentXVarBind.INTEGER,
99 get_addressMapMaxDesiredEntries());
101 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
104 public int setScalar(AgentXSetPhase phase, AgentXOID pos,
107 if ((pos == null) || (pos.compareTo(inVb.getOID()) != 0))
108 return AgentXResponsePDU.INCONSISTENT_NAME;
110 if (pos == AddressMapMaxDesiredEntriesOID)
111 return set_addressMapMaxDesiredEntries(phase, inVb.intValue());
113 return AgentXResponsePDU.NOT_WRITABLE;
116 public AgentXVarBind getNextScalar(AgentXOID pos, AgentXOID oid)
118 if ((pos == null) || (pos.compareTo(oid) <= 0))
119 return new AgentXVarBind(oid, AgentXVarBind.ENDOFMIBVIEW);
121 if (pos == AddressMapInsertsOID)
122 return new AgentXVarBind(pos, AgentXVarBind.COUNTER32,
123 get_addressMapInserts());
124 if (pos == AddressMapDeletesOID)
125 return new AgentXVarBind(pos, AgentXVarBind.COUNTER32,
126 get_addressMapDeletes());
127 if (pos == AddressMapMaxDesiredEntriesOID)
128 return new AgentXVarBind(pos, AgentXVarBind.INTEGER,
129 get_addressMapMaxDesiredEntries());
131 return new AgentXVarBind(pos, AgentXVarBind.ENDOFMIBVIEW);