Imported Upstream version 0.4.8
[platform/upstream/libsmi.git] / test / dumps / jax / ProtocolDirEntry.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: ProtocolDirEntry.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 protocolDirEntry defined in RMON2-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 ProtocolDirEntry extends AgentXEntry
23 {
24
25     protected byte[] protocolDirID = new byte[0];
26     protected byte[] protocolDirParameters = new byte[0];
27     protected int protocolDirLocalIndex = 0;
28     protected byte[] protocolDirDescr = new byte[0];
29     protected byte[] undo_protocolDirDescr = new byte[0];
30     protected byte[] protocolDirType = new byte[0];
31     protected int protocolDirAddressMapConfig = 0;
32     protected int undo_protocolDirAddressMapConfig = 0;
33     protected int protocolDirHostConfig = 0;
34     protected int undo_protocolDirHostConfig = 0;
35     protected int protocolDirMatrixConfig = 0;
36     protected int undo_protocolDirMatrixConfig = 0;
37     protected byte[] protocolDirOwner = new byte[0];
38     protected byte[] undo_protocolDirOwner = new byte[0];
39     protected int protocolDirStatus = 0;
40     protected int undo_protocolDirStatus = 0;
41
42     public ProtocolDirEntry(byte[] protocolDirID,
43                             byte[] protocolDirParameters)
44     {
45         this.protocolDirID = protocolDirID;
46         this.protocolDirParameters = protocolDirParameters;
47
48         instance.append(protocolDirID);
49         instance.append(protocolDirParameters);
50     }
51
52     public byte[] get_protocolDirID()
53     {
54         return protocolDirID;
55     }
56
57     public byte[] get_protocolDirParameters()
58     {
59         return protocolDirParameters;
60     }
61
62     public int get_protocolDirLocalIndex()
63     {
64         return protocolDirLocalIndex;
65     }
66
67     public byte[] get_protocolDirDescr()
68     {
69         return protocolDirDescr;
70     }
71
72     public int set_protocolDirDescr(AgentXSetPhase phase, byte[] value)
73     {
74         switch (phase.getPhase()) {
75         case AgentXSetPhase.TEST_SET:
76             break;
77         case AgentXSetPhase.COMMIT:
78             undo_protocolDirDescr = protocolDirDescr;
79             protocolDirDescr = new byte[value.length];
80             for(int i = 0; i < value.length; i++)
81                 protocolDirDescr[i] = value[i];
82             break;
83         case AgentXSetPhase.UNDO:
84             protocolDirDescr = undo_protocolDirDescr;
85             break;
86         case AgentXSetPhase.CLEANUP:
87             undo_protocolDirDescr = null;
88             break;
89         default:
90             return AgentXResponsePDU.PROCESSING_ERROR;
91         }
92         return AgentXResponsePDU.NO_ERROR;
93     }
94     public byte[] get_protocolDirType()
95     {
96         return protocolDirType;
97     }
98
99     public int get_protocolDirAddressMapConfig()
100     {
101         return protocolDirAddressMapConfig;
102     }
103
104     public int set_protocolDirAddressMapConfig(AgentXSetPhase phase, int value)
105     {
106         switch (phase.getPhase()) {
107         case AgentXSetPhase.TEST_SET:
108             break;
109         case AgentXSetPhase.COMMIT:
110             undo_protocolDirAddressMapConfig = protocolDirAddressMapConfig;
111             protocolDirAddressMapConfig = value;
112             break;
113         case AgentXSetPhase.UNDO:
114             protocolDirAddressMapConfig = undo_protocolDirAddressMapConfig;
115             break;
116         case AgentXSetPhase.CLEANUP:
117             break;
118         default:
119             return AgentXResponsePDU.PROCESSING_ERROR;
120         }
121         return AgentXResponsePDU.NO_ERROR;
122     }
123     public int get_protocolDirHostConfig()
124     {
125         return protocolDirHostConfig;
126     }
127
128     public int set_protocolDirHostConfig(AgentXSetPhase phase, int value)
129     {
130         switch (phase.getPhase()) {
131         case AgentXSetPhase.TEST_SET:
132             break;
133         case AgentXSetPhase.COMMIT:
134             undo_protocolDirHostConfig = protocolDirHostConfig;
135             protocolDirHostConfig = value;
136             break;
137         case AgentXSetPhase.UNDO:
138             protocolDirHostConfig = undo_protocolDirHostConfig;
139             break;
140         case AgentXSetPhase.CLEANUP:
141             break;
142         default:
143             return AgentXResponsePDU.PROCESSING_ERROR;
144         }
145         return AgentXResponsePDU.NO_ERROR;
146     }
147     public int get_protocolDirMatrixConfig()
148     {
149         return protocolDirMatrixConfig;
150     }
151
152     public int set_protocolDirMatrixConfig(AgentXSetPhase phase, int value)
153     {
154         switch (phase.getPhase()) {
155         case AgentXSetPhase.TEST_SET:
156             break;
157         case AgentXSetPhase.COMMIT:
158             undo_protocolDirMatrixConfig = protocolDirMatrixConfig;
159             protocolDirMatrixConfig = value;
160             break;
161         case AgentXSetPhase.UNDO:
162             protocolDirMatrixConfig = undo_protocolDirMatrixConfig;
163             break;
164         case AgentXSetPhase.CLEANUP:
165             break;
166         default:
167             return AgentXResponsePDU.PROCESSING_ERROR;
168         }
169         return AgentXResponsePDU.NO_ERROR;
170     }
171     public byte[] get_protocolDirOwner()
172     {
173         return protocolDirOwner;
174     }
175
176     public int set_protocolDirOwner(AgentXSetPhase phase, byte[] value)
177     {
178         switch (phase.getPhase()) {
179         case AgentXSetPhase.TEST_SET:
180             break;
181         case AgentXSetPhase.COMMIT:
182             undo_protocolDirOwner = protocolDirOwner;
183             protocolDirOwner = new byte[value.length];
184             for(int i = 0; i < value.length; i++)
185                 protocolDirOwner[i] = value[i];
186             break;
187         case AgentXSetPhase.UNDO:
188             protocolDirOwner = undo_protocolDirOwner;
189             break;
190         case AgentXSetPhase.CLEANUP:
191             undo_protocolDirOwner = null;
192             break;
193         default:
194             return AgentXResponsePDU.PROCESSING_ERROR;
195         }
196         return AgentXResponsePDU.NO_ERROR;
197     }
198     public int get_protocolDirStatus()
199     {
200         return protocolDirStatus;
201     }
202
203     public int set_protocolDirStatus(AgentXSetPhase phase, int value)
204     {
205         switch (phase.getPhase()) {
206         case AgentXSetPhase.TEST_SET:
207             break;
208         case AgentXSetPhase.COMMIT:
209             undo_protocolDirStatus = protocolDirStatus;
210             protocolDirStatus = value;
211             break;
212         case AgentXSetPhase.UNDO:
213             protocolDirStatus = undo_protocolDirStatus;
214             break;
215         case AgentXSetPhase.CLEANUP:
216             break;
217         default:
218             return AgentXResponsePDU.PROCESSING_ERROR;
219         }
220         return AgentXResponsePDU.NO_ERROR;
221     }
222 }
223