Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / ProtocolDistControlEntryImpl.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: ProtocolDistControlEntryImpl.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 protocolDistControlEntry defined in RMON2-MIB.
12  */
13
14 import jax.AgentXOID;
15 import jax.AgentXSetPhase;
16 import jax.AgentXResponsePDU;
17 import jax.AgentXEntry;
18
19 public class ProtocolDistControlEntryImpl extends ProtocolDistControlEntry
20 {
21
22     // constructor
23     public ProtocolDistControlEntryImpl(int protocolDistControlIndex)
24     {
25         super(protocolDistControlIndex);
26     }
27
28     public AgentXOID get_protocolDistControlDataSource()
29     {
30         return protocolDistControlDataSource;
31     }
32
33     public int set_protocolDistControlDataSource(AgentXSetPhase phase, AgentXOID value)
34     {
35         switch (phase.getPhase()) {
36         case AgentXSetPhase.TEST_SET:
37             break;
38         case AgentXSetPhase.COMMIT:
39             undo_protocolDistControlDataSource = protocolDistControlDataSource;
40             protocolDistControlDataSource = value;
41             break;
42         case AgentXSetPhase.UNDO:
43             protocolDistControlDataSource = undo_protocolDistControlDataSource;
44             break;
45         case AgentXSetPhase.CLEANUP:
46             break;
47         default:
48             return AgentXResponsePDU.PROCESSING_ERROR;
49         }
50         return AgentXResponsePDU.NO_ERROR;
51     }
52     public long get_protocolDistControlDroppedFrames()
53     {
54         return protocolDistControlDroppedFrames;
55     }
56
57     public long get_protocolDistControlCreateTime()
58     {
59         return protocolDistControlCreateTime;
60     }
61
62     public byte[] get_protocolDistControlOwner()
63     {
64         return protocolDistControlOwner;
65     }
66
67     public int set_protocolDistControlOwner(AgentXSetPhase phase, byte[] value)
68     {
69         switch (phase.getPhase()) {
70         case AgentXSetPhase.TEST_SET:
71             break;
72         case AgentXSetPhase.COMMIT:
73             undo_protocolDistControlOwner = protocolDistControlOwner;
74             protocolDistControlOwner = new byte[value.length];
75             for(int i = 0; i < value.length; i++)
76                 protocolDistControlOwner[i] = value[i];
77             break;
78         case AgentXSetPhase.UNDO:
79             protocolDistControlOwner = undo_protocolDistControlOwner;
80             break;
81         case AgentXSetPhase.CLEANUP:
82             undo_protocolDistControlOwner = null;
83             break;
84         default:
85             return AgentXResponsePDU.PROCESSING_ERROR;
86         }
87         return AgentXResponsePDU.NO_ERROR;
88     }
89     public int get_protocolDistControlStatus()
90     {
91         return protocolDistControlStatus;
92     }
93
94     public int set_protocolDistControlStatus(AgentXSetPhase phase, int value)
95     {
96         switch (phase.getPhase()) {
97         case AgentXSetPhase.TEST_SET:
98             break;
99         case AgentXSetPhase.COMMIT:
100             undo_protocolDistControlStatus = protocolDistControlStatus;
101             protocolDistControlStatus = value;
102             break;
103         case AgentXSetPhase.UNDO:
104             protocolDistControlStatus = undo_protocolDistControlStatus;
105             break;
106         case AgentXSetPhase.CLEANUP:
107             break;
108         default:
109             return AgentXResponsePDU.PROCESSING_ERROR;
110         }
111         return AgentXResponsePDU.NO_ERROR;
112     }
113 }
114