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: ProtocolDir.java 4432 2006-05-29 16:21:11Z strauss $
9 This class represents a Java AgentX (JAX) implementation of
10 the scalar group protocolDir 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 ProtocolDir extends AgentXScalars
28 private final static long[] ProtocolDirOID = {1, 3, 6, 1, 2, 1, 16, 11};
30 protected AgentXOID ProtocolDirLastChangeOID;
31 protected final static long[] ProtocolDirLastChangeName = {1, 3, 6, 1, 2, 1, 16, 11, 1, 0};
32 protected long protocolDirLastChange = 0;
35 oid = new AgentXOID(ProtocolDirOID);
37 ProtocolDirLastChangeOID = new AgentXOID(ProtocolDirLastChangeName);
38 data.addElement(ProtocolDirLastChangeOID);
41 public long get_protocolDirLastChange()
43 return protocolDirLastChange;
46 public AgentXVarBind getScalar(AgentXOID pos, AgentXOID oid)
48 if ((pos == null) || (pos.compareTo(oid) != 0))
49 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
51 if (pos == ProtocolDirLastChangeOID)
52 return new AgentXVarBind(oid, AgentXVarBind.TIMETICKS,
53 get_protocolDirLastChange());
55 return new AgentXVarBind(oid, AgentXVarBind.NOSUCHOBJECT);
58 public int setScalar(AgentXSetPhase phase, AgentXOID pos,
61 if ((pos == null) || (pos.compareTo(inVb.getOID()) != 0))
62 return AgentXResponsePDU.INCONSISTENT_NAME;
65 return AgentXResponsePDU.NOT_WRITABLE;
68 public AgentXVarBind getNextScalar(AgentXOID pos, AgentXOID oid)
70 if ((pos == null) || (pos.compareTo(oid) <= 0))
71 return new AgentXVarBind(oid, AgentXVarBind.ENDOFMIBVIEW);
73 if (pos == ProtocolDirLastChangeOID)
74 return new AgentXVarBind(pos, AgentXVarBind.TIMETICKS,
75 get_protocolDirLastChange());
77 return new AgentXVarBind(pos, AgentXVarBind.ENDOFMIBVIEW);