Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / IfStackEntryImpl.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: IfStackEntryImpl.java 4432 2006-05-29 16:21:11Z strauss $
7  */
8
9 /**
10     This class extends the Java AgentX (JAX) implementation of
11     the table row ifStackEntry defined in IF-MIB.
12  */
13
14 import jax.AgentXOID;
15 import jax.AgentXSetPhase;
16 import jax.AgentXResponsePDU;
17 import jax.AgentXEntry;
18
19 public class IfStackEntryImpl extends IfStackEntry
20 {
21
22     // constructor
23     public IfStackEntryImpl(int ifStackHigherLayer,
24                         int ifStackLowerLayer)
25     {
26         super(ifStackHigherLayer,
27               ifStackLowerLayer);
28     }
29
30     public int get_ifStackStatus()
31     {
32         return ifStackStatus;
33     }
34
35     public int set_ifStackStatus(AgentXSetPhase phase, int value)
36     {
37         switch (phase.getPhase()) {
38         case AgentXSetPhase.TEST_SET:
39             break;
40         case AgentXSetPhase.COMMIT:
41             undo_ifStackStatus = ifStackStatus;
42             ifStackStatus = value;
43             break;
44         case AgentXSetPhase.UNDO:
45             ifStackStatus = undo_ifStackStatus;
46             break;
47         case AgentXSetPhase.CLEANUP:
48             break;
49         default:
50             return AgentXResponsePDU.PROCESSING_ERROR;
51         }
52         return AgentXResponsePDU.NO_ERROR;
53     }
54 }
55