Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / SnmpSetImpl.java
1 /*
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.
5  *
6  * $Id: SnmpSetImpl.java 4432 2006-05-29 16:21:11Z strauss $
7  */
8
9 /**
10     This class extends the Java AgentX (JAX) implementation of
11     the scalar group snmpSet defined in SNMPv2-MIB.
12  */
13
14 import java.util.Vector;
15 import java.util.Enumeration;
16 import jax.AgentXOID;
17 import jax.AgentXSetPhase;
18 import jax.AgentXResponsePDU;
19
20 public class SnmpSetImpl extends SnmpSet
21 {
22
23     public int get_snmpSetSerialNo()
24     {
25         return snmpSetSerialNo;
26     }
27
28     public int set_snmpSetSerialNo(AgentXSetPhase phase, int value)
29     {
30         switch (phase.getPhase()) {
31         case AgentXSetPhase.TEST_SET:
32             break;
33         case AgentXSetPhase.COMMIT:
34             undo_snmpSetSerialNo = snmpSetSerialNo;
35             snmpSetSerialNo = value;
36             break;
37         case AgentXSetPhase.UNDO:
38             snmpSetSerialNo = undo_snmpSetSerialNo;
39             break;
40         case AgentXSetPhase.CLEANUP:
41             undo_snmpSetSerialNo = -1; // TODO: better check!
42             break;
43         default:
44             return AgentXResponsePDU.PROCESSING_ERROR;
45         }
46         return AgentXResponsePDU.NO_ERROR;
47     }
48
49 }
50