Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / IfStackEntry.java
1 /*
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.
4  *
5  * $Id: IfStackEntry.java 4432 2006-05-29 16:21:11Z strauss $
6  */
7
8 /**
9     This class represents a Java AgentX (JAX) implementation of
10     the table row ifStackEntry defined in IF-MIB.
11
12     @version 1
13     @author  smidump 0.4.5
14     @see     AgentXTable, AgentXEntry
15  */
16
17 import jax.AgentXOID;
18 import jax.AgentXSetPhase;
19 import jax.AgentXResponsePDU;
20 import jax.AgentXEntry;
21
22 public class IfStackEntry extends AgentXEntry
23 {
24
25     protected int ifStackHigherLayer = 0;
26     protected int ifStackLowerLayer = 0;
27     protected int ifStackStatus = 0;
28     protected int undo_ifStackStatus = 0;
29
30     public IfStackEntry(int ifStackHigherLayer,
31                         int ifStackLowerLayer)
32     {
33         this.ifStackHigherLayer = ifStackHigherLayer;
34         this.ifStackLowerLayer = ifStackLowerLayer;
35
36         instance.append(ifStackHigherLayer);
37         instance.append(ifStackLowerLayer);
38     }
39
40     public int get_ifStackHigherLayer()
41     {
42         return ifStackHigherLayer;
43     }
44
45     public int get_ifStackLowerLayer()
46     {
47         return ifStackLowerLayer;
48     }
49
50     public int get_ifStackStatus()
51     {
52         return ifStackStatus;
53     }
54
55     public int set_ifStackStatus(AgentXSetPhase phase, int value)
56     {
57         switch (phase.getPhase()) {
58         case AgentXSetPhase.TEST_SET:
59             break;
60         case AgentXSetPhase.COMMIT:
61             undo_ifStackStatus = ifStackStatus;
62             ifStackStatus = value;
63             break;
64         case AgentXSetPhase.UNDO:
65             ifStackStatus = undo_ifStackStatus;
66             break;
67         case AgentXSetPhase.CLEANUP:
68             break;
69         default:
70             return AgentXResponsePDU.PROCESSING_ERROR;
71         }
72         return AgentXResponsePDU.NO_ERROR;
73     }
74 }
75