Source code: com/opencloud/sleetck/lib/testutils/jmx/impl/ProfileProvisioningMBeanProxyImpl.java
1 package com.opencloud.sleetck.lib.testutils.jmx.impl;
2
3 import java.util.Collection;
4
5 import javax.management.InstanceNotFoundException;
6 import javax.management.MBeanException;
7 import javax.management.ObjectName;
8 import javax.management.ReflectionException;
9 import javax.management.RuntimeMBeanException;
10 import javax.slee.InvalidArgumentException;
11 import javax.slee.management.ManagementException;
12 import javax.slee.profile.AttributeNotIndexedException;
13 import javax.slee.profile.AttributeTypeMismatchException;
14 import javax.slee.profile.ProfileAlreadyExistsException;
15 import javax.slee.profile.ProfileSpecificationID;
16 import javax.slee.profile.ProfileTableAlreadyExistsException;
17 import javax.slee.profile.UnrecognizedAttributeException;
18 import javax.slee.profile.UnrecognizedProfileNameException;
19 import javax.slee.profile.UnrecognizedProfileSpecificationException;
20 import javax.slee.profile.UnrecognizedProfileTableNameException;
21
22 import com.opencloud.sleetck.lib.TCKTestErrorException;
23 import com.opencloud.sleetck.lib.testutils.jmx.MBeanFacade;
24 import com.opencloud.sleetck.lib.testutils.jmx.ProfileProvisioningMBeanProxy;
25
26 /**
27 * Defines a proxy implementation for javax.slee.management.ProfileProvisioningMBean
28 *
29 * In addition to the Exceptions declared by each proxied method,
30 * each proxy method can throw a TCKTestErrorException - for commication failures,
31 * and to wrap InstanceNotFoundExceptions and ReflectionExceptions generated by the
32 * MBeanServer.invoke() method, and unchecked Exceptions other than RuntimeExceptions.
33 * RuntimeExceptions generated by the MBean are rethrown by the proxy.
34 *
35 * This class was generated by the ProxyGenerator tool - Tue Jan 20 14:34:08 NZDT 2004
36 * Command line args: -a javax.slee.management.ProfileProvisioningMBean
37 */
38 public class ProfileProvisioningMBeanProxyImpl implements ProfileProvisioningMBeanProxy {
39
40 public ProfileProvisioningMBeanProxyImpl(ObjectName objName, MBeanFacade facade) {
41 this.objName = objName;
42 this.facade = facade;
43 }
44
45 public ObjectName getDefaultProfile(String p0) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException, TCKTestErrorException {
46 try {
47 return (ObjectName)facade.invoke(objName,"getDefaultProfile",new Object[]{p0},new String[]{"java.lang.String"});
48 } catch(InstanceNotFoundException ie) {
49 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
50 } catch(ReflectionException re) {
51 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
52 } catch(MBeanException e) {
53 Exception enclosed = e.getTargetException();
54 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
55 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
56 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
57 } catch(RuntimeMBeanException e) {
58 Exception enclosed = e.getTargetException();
59 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
60 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
61 }
62 }
63
64 public ProfileSpecificationID getProfileSpecification(String p0) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException, TCKTestErrorException {
65 try {
66 return (ProfileSpecificationID)facade.invoke(objName,"getProfileSpecification",new Object[]{p0},new String[]{"java.lang.String"});
67 } catch(InstanceNotFoundException ie) {
68 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
69 } catch(ReflectionException re) {
70 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
71 } catch(MBeanException e) {
72 Exception enclosed = e.getTargetException();
73 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
74 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
75 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
76 } catch(RuntimeMBeanException e) {
77 Exception enclosed = e.getTargetException();
78 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
79 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
80 }
81 }
82
83 public Collection getProfiles(String p0) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException, TCKTestErrorException {
84 try {
85 return (Collection)facade.invoke(objName,"getProfiles",new Object[]{p0},new String[]{"java.lang.String"});
86 } catch(InstanceNotFoundException ie) {
87 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
88 } catch(ReflectionException re) {
89 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
90 } catch(MBeanException e) {
91 Exception enclosed = e.getTargetException();
92 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
93 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
94 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
95 } catch(RuntimeMBeanException e) {
96 Exception enclosed = e.getTargetException();
97 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
98 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
99 }
100 }
101
102 public ObjectName getProfile(String p0, String p1) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException, TCKTestErrorException {
103 try {
104 return (ObjectName)facade.invoke(objName,"getProfile",new Object[]{p0,p1},new String[]{"java.lang.String","java.lang.String"});
105 } catch(InstanceNotFoundException ie) {
106 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
107 } catch(ReflectionException re) {
108 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
109 } catch(MBeanException e) {
110 Exception enclosed = e.getTargetException();
111 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
112 if(enclosed instanceof UnrecognizedProfileNameException) throw (UnrecognizedProfileNameException)enclosed;
113 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
114 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
115 } catch(RuntimeMBeanException e) {
116 Exception enclosed = e.getTargetException();
117 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
118 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
119 }
120 }
121
122 public void removeProfileTable(String p0) throws NullPointerException, UnrecognizedProfileTableNameException, ManagementException, TCKTestErrorException {
123 try {
124 facade.invoke(objName,"removeProfileTable",new Object[]{p0},new String[]{"java.lang.String"});
125 } catch(InstanceNotFoundException ie) {
126 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
127 } catch(ReflectionException re) {
128 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
129 } catch(MBeanException e) {
130 Exception enclosed = e.getTargetException();
131 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
132 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
133 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
134 } catch(RuntimeMBeanException e) {
135 Exception enclosed = e.getTargetException();
136 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
137 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
138 }
139 }
140
141 public void removeProfile(String p0, String p1) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedProfileNameException, ManagementException, TCKTestErrorException {
142 try {
143 facade.invoke(objName,"removeProfile",new Object[]{p0,p1},new String[]{"java.lang.String","java.lang.String"});
144 } catch(InstanceNotFoundException ie) {
145 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
146 } catch(ReflectionException re) {
147 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
148 } catch(MBeanException e) {
149 Exception enclosed = e.getTargetException();
150 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
151 if(enclosed instanceof UnrecognizedProfileNameException) throw (UnrecognizedProfileNameException)enclosed;
152 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
153 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
154 } catch(RuntimeMBeanException e) {
155 Exception enclosed = e.getTargetException();
156 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
157 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
158 }
159 }
160
161 public void createProfileTable(ProfileSpecificationID p0, String p1) throws NullPointerException, UnrecognizedProfileSpecificationException, InvalidArgumentException, ProfileTableAlreadyExistsException, ManagementException, TCKTestErrorException {
162 try {
163 facade.invoke(objName,"createProfileTable",new Object[]{p0,p1},new String[]{"javax.slee.profile.ProfileSpecificationID","java.lang.String"});
164 } catch(InstanceNotFoundException ie) {
165 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
166 } catch(ReflectionException re) {
167 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
168 } catch(MBeanException e) {
169 Exception enclosed = e.getTargetException();
170 if(enclosed instanceof UnrecognizedProfileSpecificationException) throw (UnrecognizedProfileSpecificationException)enclosed;
171 if(enclosed instanceof InvalidArgumentException) throw (InvalidArgumentException)enclosed;
172 if(enclosed instanceof ProfileTableAlreadyExistsException) throw (ProfileTableAlreadyExistsException)enclosed;
173 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
174 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
175 } catch(RuntimeMBeanException e) {
176 Exception enclosed = e.getTargetException();
177 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
178 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
179 }
180 }
181
182 public Collection getProfilesByIndexedAttribute(String p0, String p1, Object p2) throws NullPointerException, UnrecognizedProfileTableNameException, UnrecognizedAttributeException, AttributeNotIndexedException, AttributeTypeMismatchException, ManagementException, TCKTestErrorException {
183 try {
184 return (Collection)facade.invoke(objName,"getProfilesByIndexedAttribute",new Object[]{p0,p1,p2},new String[]{"java.lang.String","java.lang.String","java.lang.Object"});
185 } catch(InstanceNotFoundException ie) {
186 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
187 } catch(ReflectionException re) {
188 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
189 } catch(MBeanException e) {
190 Exception enclosed = e.getTargetException();
191 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
192 if(enclosed instanceof UnrecognizedAttributeException) throw (UnrecognizedAttributeException)enclosed;
193 if(enclosed instanceof AttributeNotIndexedException) throw (AttributeNotIndexedException)enclosed;
194 if(enclosed instanceof AttributeTypeMismatchException) throw (AttributeTypeMismatchException)enclosed;
195 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
196 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
197 } catch(RuntimeMBeanException e) {
198 Exception enclosed = e.getTargetException();
199 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
200 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
201 }
202 }
203
204 public void renameProfileTable(String p0, String p1) throws NullPointerException, UnrecognizedProfileTableNameException, InvalidArgumentException, ProfileTableAlreadyExistsException, ManagementException, TCKTestErrorException {
205 try {
206 facade.invoke(objName,"renameProfileTable",new Object[]{p0,p1},new String[]{"java.lang.String","java.lang.String"});
207 } catch(InstanceNotFoundException ie) {
208 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
209 } catch(ReflectionException re) {
210 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
211 } catch(MBeanException e) {
212 Exception enclosed = e.getTargetException();
213 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
214 if(enclosed instanceof InvalidArgumentException) throw (InvalidArgumentException)enclosed;
215 if(enclosed instanceof ProfileTableAlreadyExistsException) throw (ProfileTableAlreadyExistsException)enclosed;
216 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
217 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
218 } catch(RuntimeMBeanException e) {
219 Exception enclosed = e.getTargetException();
220 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
221 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
222 }
223 }
224
225 public Collection getProfileTables() throws ManagementException, TCKTestErrorException {
226 try {
227 return (Collection)facade.invoke(objName,"getProfileTables",EmptyArrays.EMPTY_OBJECT_ARRAY,EmptyArrays.EMPTY_STRING_ARRAY);
228 } catch(InstanceNotFoundException ie) {
229 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
230 } catch(ReflectionException re) {
231 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
232 } catch(MBeanException e) {
233 Exception enclosed = e.getTargetException();
234 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
235 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
236 } catch(RuntimeMBeanException e) {
237 Exception enclosed = e.getTargetException();
238 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
239 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
240 }
241 }
242
243 public ObjectName createProfile(String p0, String p1) throws NullPointerException, UnrecognizedProfileTableNameException, InvalidArgumentException, ProfileAlreadyExistsException, ManagementException, TCKTestErrorException {
244 try {
245 return (ObjectName)facade.invoke(objName,"createProfile",new Object[]{p0,p1},new String[]{"java.lang.String","java.lang.String"});
246 } catch(InstanceNotFoundException ie) {
247 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",ie);
248 } catch(ReflectionException re) {
249 throw new TCKTestErrorException("Caught Exception while calling MBeanServer.invoke()",re);
250 } catch(MBeanException e) {
251 Exception enclosed = e.getTargetException();
252 if(enclosed instanceof UnrecognizedProfileTableNameException) throw (UnrecognizedProfileTableNameException)enclosed;
253 if(enclosed instanceof InvalidArgumentException) throw (InvalidArgumentException)enclosed;
254 if(enclosed instanceof ProfileAlreadyExistsException) throw (ProfileAlreadyExistsException)enclosed;
255 if(enclosed instanceof ManagementException) throw (ManagementException)enclosed;
256 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
257 } catch(RuntimeMBeanException e) {
258 Exception enclosed = e.getTargetException();
259 if(enclosed instanceof RuntimeException) throw (RuntimeException)enclosed;
260 throw new TCKTestErrorException("Caught undeclared exception",enclosed);
261 }
262 }
263
264 private ObjectName objName;
265 private MBeanFacade facade;
266
267 }