2 * This Java file has been generated by smidump 0.4.5. It
3 * is intended to be edited by the application programmer and
4 * to be used within a Java AgentX sub-agent environment.
6 * $Id: SystemImpl.java 4432 2006-05-29 16:21:11Z strauss $
10 This class extends the Java AgentX (JAX) implementation of
11 the scalar group system defined in SNMPv2-MIB.
14 import java.util.Vector;
15 import java.util.Enumeration;
17 import jax.AgentXSetPhase;
18 import jax.AgentXResponsePDU;
20 public class SystemImpl extends System
23 public byte[] get_sysDescr()
28 public AgentXOID get_sysObjectID()
33 public long get_sysUpTime()
38 public byte[] get_sysContact()
43 public int set_sysContact(AgentXSetPhase phase, byte[] value)
45 switch (phase.getPhase()) {
46 case AgentXSetPhase.TEST_SET:
48 case AgentXSetPhase.COMMIT:
49 undo_sysContact = sysContact;
50 sysContact = new byte[value.length];
51 for(int i = 0; i < value.length; i++)
52 sysContact[i] = value[i];
54 case AgentXSetPhase.UNDO:
55 sysContact = undo_sysContact;
57 case AgentXSetPhase.CLEANUP:
58 undo_sysContact = null;
61 return AgentXResponsePDU.PROCESSING_ERROR;
63 return AgentXResponsePDU.NO_ERROR;
66 public byte[] get_sysName()
71 public int set_sysName(AgentXSetPhase phase, byte[] value)
73 switch (phase.getPhase()) {
74 case AgentXSetPhase.TEST_SET:
76 case AgentXSetPhase.COMMIT:
77 undo_sysName = sysName;
78 sysName = new byte[value.length];
79 for(int i = 0; i < value.length; i++)
80 sysName[i] = value[i];
82 case AgentXSetPhase.UNDO:
83 sysName = undo_sysName;
85 case AgentXSetPhase.CLEANUP:
89 return AgentXResponsePDU.PROCESSING_ERROR;
91 return AgentXResponsePDU.NO_ERROR;
94 public byte[] get_sysLocation()
99 public int set_sysLocation(AgentXSetPhase phase, byte[] value)
101 switch (phase.getPhase()) {
102 case AgentXSetPhase.TEST_SET:
104 case AgentXSetPhase.COMMIT:
105 undo_sysLocation = sysLocation;
106 sysLocation = new byte[value.length];
107 for(int i = 0; i < value.length; i++)
108 sysLocation[i] = value[i];
110 case AgentXSetPhase.UNDO:
111 sysLocation = undo_sysLocation;
113 case AgentXSetPhase.CLEANUP:
114 undo_sysLocation = null;
117 return AgentXResponsePDU.PROCESSING_ERROR;
119 return AgentXResponsePDU.NO_ERROR;
122 public int get_sysServices()
127 public long get_sysORLastChange()
129 return sysORLastChange;