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.
6 * $Id: TrapDestEntryImpl.java 4432 2006-05-29 16:21:11Z strauss $
10 This class extends the Java AgentX (JAX) implementation of
11 the table row trapDestEntry defined in RMON2-MIB.
15 import jax.AgentXSetPhase;
16 import jax.AgentXResponsePDU;
17 import jax.AgentXEntry;
19 public class TrapDestEntryImpl extends TrapDestEntry
23 public TrapDestEntryImpl(int trapDestIndex)
28 public byte[] get_trapDestCommunity()
30 return trapDestCommunity;
33 public int set_trapDestCommunity(AgentXSetPhase phase, byte[] value)
35 switch (phase.getPhase()) {
36 case AgentXSetPhase.TEST_SET:
38 case AgentXSetPhase.COMMIT:
39 undo_trapDestCommunity = trapDestCommunity;
40 trapDestCommunity = new byte[value.length];
41 for(int i = 0; i < value.length; i++)
42 trapDestCommunity[i] = value[i];
44 case AgentXSetPhase.UNDO:
45 trapDestCommunity = undo_trapDestCommunity;
47 case AgentXSetPhase.CLEANUP:
48 undo_trapDestCommunity = null;
51 return AgentXResponsePDU.PROCESSING_ERROR;
53 return AgentXResponsePDU.NO_ERROR;
55 public int get_trapDestProtocol()
57 return trapDestProtocol;
60 public int set_trapDestProtocol(AgentXSetPhase phase, int value)
62 switch (phase.getPhase()) {
63 case AgentXSetPhase.TEST_SET:
65 case AgentXSetPhase.COMMIT:
66 undo_trapDestProtocol = trapDestProtocol;
67 trapDestProtocol = value;
69 case AgentXSetPhase.UNDO:
70 trapDestProtocol = undo_trapDestProtocol;
72 case AgentXSetPhase.CLEANUP:
75 return AgentXResponsePDU.PROCESSING_ERROR;
77 return AgentXResponsePDU.NO_ERROR;
79 public byte[] get_trapDestAddress()
81 return trapDestAddress;
84 public int set_trapDestAddress(AgentXSetPhase phase, byte[] value)
86 switch (phase.getPhase()) {
87 case AgentXSetPhase.TEST_SET:
89 case AgentXSetPhase.COMMIT:
90 undo_trapDestAddress = trapDestAddress;
91 trapDestAddress = new byte[value.length];
92 for(int i = 0; i < value.length; i++)
93 trapDestAddress[i] = value[i];
95 case AgentXSetPhase.UNDO:
96 trapDestAddress = undo_trapDestAddress;
98 case AgentXSetPhase.CLEANUP:
99 undo_trapDestAddress = null;
102 return AgentXResponsePDU.PROCESSING_ERROR;
104 return AgentXResponsePDU.NO_ERROR;
106 public byte[] get_trapDestOwner()
108 return trapDestOwner;
111 public int set_trapDestOwner(AgentXSetPhase phase, byte[] value)
113 switch (phase.getPhase()) {
114 case AgentXSetPhase.TEST_SET:
116 case AgentXSetPhase.COMMIT:
117 undo_trapDestOwner = trapDestOwner;
118 trapDestOwner = new byte[value.length];
119 for(int i = 0; i < value.length; i++)
120 trapDestOwner[i] = value[i];
122 case AgentXSetPhase.UNDO:
123 trapDestOwner = undo_trapDestOwner;
125 case AgentXSetPhase.CLEANUP:
126 undo_trapDestOwner = null;
129 return AgentXResponsePDU.PROCESSING_ERROR;
131 return AgentXResponsePDU.NO_ERROR;
133 public int get_trapDestStatus()
135 return trapDestStatus;
138 public int set_trapDestStatus(AgentXSetPhase phase, int value)
140 switch (phase.getPhase()) {
141 case AgentXSetPhase.TEST_SET:
143 case AgentXSetPhase.COMMIT:
144 undo_trapDestStatus = trapDestStatus;
145 trapDestStatus = value;
147 case AgentXSetPhase.UNDO:
148 trapDestStatus = undo_trapDestStatus;
150 case AgentXSetPhase.CLEANUP:
153 return AgentXResponsePDU.PROCESSING_ERROR;
155 return AgentXResponsePDU.NO_ERROR;