root / src / com / rackspace / cloud / loadbalancer / api / client / LoadBalancerManager.java @ f3633a16
History | View | Annotate | Download (17 kB)
1 |
/**
|
---|---|
2 |
*
|
3 |
*/
|
4 |
package com.rackspace.cloud.loadbalancer.api.client; |
5 |
|
6 |
import java.io.IOException; |
7 |
import java.io.StringReader; |
8 |
import java.io.UnsupportedEncodingException; |
9 |
import java.util.ArrayList; |
10 |
|
11 |
import javax.xml.parsers.FactoryConfigurationError; |
12 |
import javax.xml.parsers.ParserConfigurationException; |
13 |
import javax.xml.parsers.SAXParser; |
14 |
import javax.xml.parsers.SAXParserFactory; |
15 |
|
16 |
import org.apache.http.HttpResponse; |
17 |
import org.apache.http.client.ClientProtocolException; |
18 |
import org.apache.http.client.methods.HttpDelete; |
19 |
import org.apache.http.client.methods.HttpGet; |
20 |
import org.apache.http.client.methods.HttpPost; |
21 |
import org.apache.http.client.methods.HttpPut; |
22 |
import org.apache.http.entity.StringEntity; |
23 |
import org.apache.http.impl.client.BasicResponseHandler; |
24 |
import org.apache.http.protocol.RequestExpectContinue; |
25 |
import org.xml.sax.InputSource; |
26 |
import org.xml.sax.SAXException; |
27 |
import org.xml.sax.XMLReader; |
28 |
|
29 |
import android.content.Context; |
30 |
import android.util.Log; |
31 |
|
32 |
import com.rackspace.cloud.files.api.client.CustomHttpClient; |
33 |
import com.rackspace.cloud.loadbalancer.api.client.http.LoadBalancersException; |
34 |
import com.rackspace.cloud.loadbalancer.api.parsers.CloudLoadBalancersFaultXMLParser; |
35 |
import com.rackspace.cloud.loadbalancer.api.parsers.LoadBalancersXmlParser; |
36 |
import com.rackspace.cloud.servers.api.client.Account; |
37 |
import com.rackspace.cloud.servers.api.client.CloudServersException; |
38 |
import com.rackspace.cloud.servers.api.client.http.HttpBundle; |
39 |
import com.rackspacecloud.android.Preferences; |
40 |
|
41 |
public class LoadBalancerManager extends EntityManager { |
42 |
private Context context; |
43 |
|
44 |
public LoadBalancerManager(Context context) { |
45 |
this.context = context;
|
46 |
} |
47 |
|
48 |
public LoadBalancer getLoadBalancerById(long id) |
49 |
throws LoadBalancersException {
|
50 |
LoadBalancer loadBalancer = null;
|
51 |
// First try DFW
|
52 |
try {
|
53 |
loadBalancer = getLoadBalancerById(id, |
54 |
Account.getLoadBalancerDFWUrl()); |
55 |
loadBalancer.setRegion("DFW");
|
56 |
} catch (LoadBalancersException lbe) {
|
57 |
// Didn't work
|
58 |
|
59 |
} |
60 |
|
61 |
// Then try ORD
|
62 |
if (loadBalancer == null) { |
63 |
try {
|
64 |
loadBalancer = getLoadBalancerById(id, |
65 |
Account.getLoadBalancerORDUrl()); |
66 |
loadBalancer.setRegion("ORD");
|
67 |
} catch (LoadBalancersException lbe) {
|
68 |
|
69 |
} |
70 |
} |
71 |
|
72 |
// Then try LON
|
73 |
if (loadBalancer == null) { |
74 |
try {
|
75 |
loadBalancer = getLoadBalancerById(id, |
76 |
Account.getLoadBalancerLONUrl()); |
77 |
loadBalancer.setRegion("LON");
|
78 |
} catch (LoadBalancersException lbe) {
|
79 |
throw lbe;
|
80 |
} |
81 |
} |
82 |
return loadBalancer;
|
83 |
} |
84 |
|
85 |
private LoadBalancer getLoadBalancerById(long id, String url) |
86 |
throws LoadBalancersException {
|
87 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
88 |
HttpGet get = new HttpGet(url + Account.getAccount().getAccountId()
|
89 |
+ "/loadbalancers/" + id);
|
90 |
LoadBalancer loadBalancer = new LoadBalancer();
|
91 |
|
92 |
get.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
93 |
get.addHeader("Accept", "application/xml"); |
94 |
|
95 |
try {
|
96 |
HttpResponse resp = httpclient.execute(get); |
97 |
BasicResponseHandler responseHandler = new BasicResponseHandler();
|
98 |
String body = responseHandler.handleResponse(resp);
|
99 |
|
100 |
if (resp.getStatusLine().getStatusCode() == 200 |
101 |
|| resp.getStatusLine().getStatusCode() == 202) {
|
102 |
LoadBalancersXmlParser loadBalancersXMLParser = new LoadBalancersXmlParser();
|
103 |
SAXParser saxParser = SAXParserFactory.newInstance() |
104 |
.newSAXParser(); |
105 |
XMLReader xmlReader = saxParser.getXMLReader(); |
106 |
xmlReader.setContentHandler(loadBalancersXMLParser); |
107 |
xmlReader.parse(new InputSource(new StringReader(body))); |
108 |
loadBalancer = loadBalancersXMLParser.getLoadBalancer(); |
109 |
} else {
|
110 |
CloudLoadBalancersFaultXMLParser parser = new CloudLoadBalancersFaultXMLParser();
|
111 |
SAXParser saxParser = SAXParserFactory.newInstance() |
112 |
.newSAXParser(); |
113 |
XMLReader xmlReader = saxParser.getXMLReader(); |
114 |
xmlReader.setContentHandler(parser); |
115 |
xmlReader.parse(new InputSource(new StringReader(body))); |
116 |
LoadBalancersException cse = parser.getException(); |
117 |
throw cse;
|
118 |
} |
119 |
} catch (ClientProtocolException e) {
|
120 |
LoadBalancersException cse = new LoadBalancersException();
|
121 |
cse.setMessage(e.getLocalizedMessage()); |
122 |
throw cse;
|
123 |
} catch (IOException e) { |
124 |
LoadBalancersException cse = new LoadBalancersException();
|
125 |
cse.setMessage(e.getLocalizedMessage()); |
126 |
throw cse;
|
127 |
} catch (ParserConfigurationException e) { |
128 |
LoadBalancersException cse = new LoadBalancersException();
|
129 |
cse.setMessage(e.getLocalizedMessage()); |
130 |
throw cse;
|
131 |
} catch (SAXException e) {
|
132 |
LoadBalancersException cse = new LoadBalancersException();
|
133 |
cse.setMessage(e.getLocalizedMessage()); |
134 |
throw cse;
|
135 |
} catch (FactoryConfigurationError e) { |
136 |
LoadBalancersException cse = new LoadBalancersException();
|
137 |
cse.setMessage(e.getLocalizedMessage()); |
138 |
throw cse;
|
139 |
} |
140 |
return loadBalancer;
|
141 |
} |
142 |
|
143 |
public ArrayList<LoadBalancer> createList() throws LoadBalancersException { |
144 |
|
145 |
ArrayList<LoadBalancer> loadBalancers = new ArrayList<LoadBalancer>(); |
146 |
String authServer = Account.getAccount().getAuthServer();
|
147 |
if(authServer == null){ |
148 |
authServer = Account.getAccount().getAuthServerV2(); |
149 |
} |
150 |
|
151 |
// if US account
|
152 |
if (authServer.equals(Preferences.COUNTRY_US_AUTH_SERVER) || authServer.equals(Preferences.COUNTRY_US_AUTH_SERVER_V2)) { |
153 |
loadBalancers |
154 |
.addAll(createSublist(Account.getLoadBalancerORDUrl())); |
155 |
for (LoadBalancer loadBalancer : loadBalancers) {
|
156 |
loadBalancer.setRegion("ORD");
|
157 |
} |
158 |
ArrayList<LoadBalancer> DFWloadBalancers = createSublist(Account
|
159 |
.getLoadBalancerDFWUrl()); |
160 |
for (LoadBalancer loadBalancer : DFWloadBalancers) {
|
161 |
loadBalancer.setRegion("DFW");
|
162 |
} |
163 |
loadBalancers.addAll(DFWloadBalancers); |
164 |
} |
165 |
// if UK account
|
166 |
else if (authServer.equals(Preferences.COUNTRY_UK_AUTH_SERVER) || authServer.equals(Preferences.COUNTRY_UK_AUTH_SERVER_V2)) { |
167 |
loadBalancers |
168 |
.addAll(createSublist(Account.getLoadBalancerLONUrl())); |
169 |
for (LoadBalancer loadBalancer : loadBalancers) {
|
170 |
loadBalancer.setRegion("LON");
|
171 |
} |
172 |
} |
173 |
return loadBalancers;
|
174 |
} |
175 |
|
176 |
public ArrayList<LoadBalancer> createSublist(String regionUrl) |
177 |
throws LoadBalancersException {
|
178 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
179 |
HttpGet get = new HttpGet(regionUrl
|
180 |
+ Account.getAccount().getAccountId() + "/loadbalancers");
|
181 |
ArrayList<LoadBalancer> loadBalancers = new ArrayList<LoadBalancer>(); |
182 |
|
183 |
get.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
184 |
get.addHeader("Accept", "application/xml"); |
185 |
|
186 |
try {
|
187 |
HttpResponse resp = httpclient.execute(get); |
188 |
BasicResponseHandler responseHandler = new BasicResponseHandler();
|
189 |
String body = responseHandler.handleResponse(resp);
|
190 |
if (resp.getStatusLine().getStatusCode() == 200 |
191 |
|| resp.getStatusLine().getStatusCode() == 202) {
|
192 |
LoadBalancersXmlParser loadBalancersXMLParser = new LoadBalancersXmlParser();
|
193 |
SAXParser saxParser = SAXParserFactory.newInstance() |
194 |
.newSAXParser(); |
195 |
XMLReader xmlReader = saxParser.getXMLReader(); |
196 |
xmlReader.setContentHandler(loadBalancersXMLParser); |
197 |
xmlReader.parse(new InputSource(new StringReader(body))); |
198 |
loadBalancers = loadBalancersXMLParser.getLoadBalancers(); |
199 |
} else {
|
200 |
CloudLoadBalancersFaultXMLParser parser = new CloudLoadBalancersFaultXMLParser();
|
201 |
SAXParser saxParser = SAXParserFactory.newInstance() |
202 |
.newSAXParser(); |
203 |
XMLReader xmlReader = saxParser.getXMLReader(); |
204 |
xmlReader.setContentHandler(parser); |
205 |
xmlReader.parse(new InputSource(new StringReader(body))); |
206 |
LoadBalancersException cse = parser.getException(); |
207 |
throw cse;
|
208 |
} |
209 |
} catch (ClientProtocolException e) {
|
210 |
LoadBalancersException cse = new LoadBalancersException();
|
211 |
cse.setMessage(e.getLocalizedMessage()); |
212 |
throw cse;
|
213 |
} catch (IOException e) { |
214 |
LoadBalancersException cse = new LoadBalancersException();
|
215 |
cse.setMessage(e.getLocalizedMessage()); |
216 |
throw cse;
|
217 |
} catch (ParserConfigurationException e) { |
218 |
LoadBalancersException cse = new LoadBalancersException();
|
219 |
cse.setMessage(e.getLocalizedMessage()); |
220 |
throw cse;
|
221 |
} catch (SAXException e) {
|
222 |
LoadBalancersException cse = new LoadBalancersException();
|
223 |
cse.setMessage(e.getLocalizedMessage()); |
224 |
throw cse;
|
225 |
} catch (FactoryConfigurationError e) { |
226 |
LoadBalancersException cse = new LoadBalancersException();
|
227 |
cse.setMessage(e.getLocalizedMessage()); |
228 |
throw cse;
|
229 |
} |
230 |
return loadBalancers;
|
231 |
} |
232 |
|
233 |
public HttpBundle create(LoadBalancer entity, String regionUrl) |
234 |
throws CloudServersException {
|
235 |
HttpResponse resp = null;
|
236 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
237 |
|
238 |
HttpPost post = new HttpPost(regionUrl
|
239 |
+ Account.getAccount().getAccountId() + "/loadbalancers");
|
240 |
post.addHeader("Content-Type", "application/xml"); |
241 |
|
242 |
StringEntity tmp = null;
|
243 |
try {
|
244 |
tmp = new StringEntity(entity.toDetailedXML());
|
245 |
} catch (UnsupportedEncodingException e) { |
246 |
CloudServersException cse = new CloudServersException();
|
247 |
cse.setMessage(e.getLocalizedMessage()); |
248 |
throw cse;
|
249 |
} |
250 |
|
251 |
post.setEntity(tmp); |
252 |
|
253 |
post.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
254 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
255 |
|
256 |
HttpBundle bundle = new HttpBundle();
|
257 |
bundle.setCurlRequest(post); |
258 |
try {
|
259 |
resp = httpclient.execute(post); |
260 |
bundle.setHttpResponse(resp); |
261 |
} catch (ClientProtocolException e) {
|
262 |
CloudServersException cse = new CloudServersException();
|
263 |
cse.setMessage(e.getLocalizedMessage()); |
264 |
throw cse;
|
265 |
} catch (IOException e) { |
266 |
CloudServersException cse = new CloudServersException();
|
267 |
cse.setMessage(e.getLocalizedMessage()); |
268 |
throw cse;
|
269 |
} catch (FactoryConfigurationError e) { |
270 |
CloudServersException cse = new CloudServersException();
|
271 |
cse.setMessage(e.getLocalizedMessage()); |
272 |
throw cse;
|
273 |
} |
274 |
return bundle;
|
275 |
} |
276 |
|
277 |
public HttpBundle delete(LoadBalancer loadBalancer)
|
278 |
throws CloudServersException {
|
279 |
HttpResponse resp = null;
|
280 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
281 |
|
282 |
HttpDelete delete = new HttpDelete(
|
283 |
LoadBalancer.getRegionUrl(loadBalancer.getRegion()) |
284 |
+ Account.getAccount().getAccountId() |
285 |
+ "/loadbalancers/" + loadBalancer.getId());
|
286 |
delete.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
287 |
delete.addHeader("Content-Type", "application/xml"); |
288 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
289 |
|
290 |
HttpBundle bundle = new HttpBundle();
|
291 |
bundle.setCurlRequest(delete); |
292 |
|
293 |
try {
|
294 |
resp = httpclient.execute(delete); |
295 |
bundle.setHttpResponse(resp); |
296 |
} catch (ClientProtocolException e) {
|
297 |
CloudServersException cse = new CloudServersException();
|
298 |
cse.setMessage(e.getLocalizedMessage()); |
299 |
throw cse;
|
300 |
} catch (IOException e) { |
301 |
CloudServersException cse = new CloudServersException();
|
302 |
cse.setMessage(e.getLocalizedMessage()); |
303 |
throw cse;
|
304 |
} catch (FactoryConfigurationError e) { |
305 |
CloudServersException cse = new CloudServersException();
|
306 |
cse.setMessage(e.getLocalizedMessage()); |
307 |
throw cse;
|
308 |
} |
309 |
return bundle;
|
310 |
} |
311 |
|
312 |
public HttpBundle update(LoadBalancer loadBalancer, String name, |
313 |
String algorithm, String protocol, String port) |
314 |
throws CloudServersException {
|
315 |
HttpResponse resp = null;
|
316 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
317 |
|
318 |
HttpPut put = new HttpPut(LoadBalancer.getRegionUrl(loadBalancer
|
319 |
.getRegion()) |
320 |
+ Account.getAccount().getAccountId() |
321 |
+ "/loadbalancers/" + loadBalancer.getId());
|
322 |
|
323 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
324 |
put.addHeader("Content-Type", "application/xml"); |
325 |
|
326 |
String xml = "<loadBalancer xmlns=\"http://docs.openstack.org/loadbalancers/api/v1.0\" " |
327 |
+ "name=\""
|
328 |
+ name |
329 |
+ "\" "
|
330 |
+ "algorithm=\""
|
331 |
+ algorithm.toUpperCase() |
332 |
+ "\" "
|
333 |
+ "protocol=\""
|
334 |
+ protocol + "\" " + "port=\"" + port + "\" />"; |
335 |
|
336 |
StringEntity tmp = null;
|
337 |
try {
|
338 |
tmp = new StringEntity(xml);
|
339 |
} catch (UnsupportedEncodingException e) { |
340 |
CloudServersException cse = new CloudServersException();
|
341 |
cse.setMessage(e.getLocalizedMessage()); |
342 |
throw cse;
|
343 |
} |
344 |
|
345 |
put.setEntity(tmp); |
346 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
347 |
|
348 |
HttpBundle bundle = new HttpBundle();
|
349 |
bundle.setCurlRequest(put); |
350 |
|
351 |
try {
|
352 |
resp = httpclient.execute(put); |
353 |
bundle.setHttpResponse(resp); |
354 |
} catch (ClientProtocolException e) {
|
355 |
CloudServersException cse = new CloudServersException();
|
356 |
cse.setMessage(e.getLocalizedMessage()); |
357 |
throw cse;
|
358 |
} catch (IOException e) { |
359 |
CloudServersException cse = new CloudServersException();
|
360 |
cse.setMessage(e.getLocalizedMessage()); |
361 |
throw cse;
|
362 |
} catch (FactoryConfigurationError e) { |
363 |
CloudServersException cse = new CloudServersException();
|
364 |
cse.setMessage(e.getLocalizedMessage()); |
365 |
throw cse;
|
366 |
} |
367 |
return bundle;
|
368 |
} |
369 |
|
370 |
public HttpBundle setLogging(LoadBalancer loadBalancer, Boolean setting) |
371 |
throws CloudServersException {
|
372 |
HttpResponse resp = null;
|
373 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
374 |
|
375 |
HttpPut put = new HttpPut(LoadBalancer.getRegionUrl(loadBalancer
|
376 |
.getRegion()) |
377 |
+ Account.getAccount().getAccountId() |
378 |
+ "/loadbalancers/"
|
379 |
+ loadBalancer.getId() |
380 |
+ "/connectionlogging");
|
381 |
|
382 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
383 |
put.addHeader("Content-Type", "application/xml"); |
384 |
|
385 |
String xml = "<connectionLogging xmlns=\"http://docs.openstack.org/loadbalancers/api/v1.0\" " |
386 |
+ "enabled=\"" + setting.toString() + "\" />"; |
387 |
|
388 |
StringEntity tmp = null;
|
389 |
try {
|
390 |
tmp = new StringEntity(xml);
|
391 |
} catch (UnsupportedEncodingException e) { |
392 |
CloudServersException cse = new CloudServersException();
|
393 |
cse.setMessage(e.getLocalizedMessage()); |
394 |
throw cse;
|
395 |
} |
396 |
|
397 |
put.setEntity(tmp); |
398 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
399 |
|
400 |
HttpBundle bundle = new HttpBundle();
|
401 |
bundle.setCurlRequest(put); |
402 |
|
403 |
try {
|
404 |
resp = httpclient.execute(put); |
405 |
bundle.setHttpResponse(resp); |
406 |
} catch (ClientProtocolException e) {
|
407 |
CloudServersException cse = new CloudServersException();
|
408 |
cse.setMessage(e.getLocalizedMessage()); |
409 |
throw cse;
|
410 |
} catch (IOException e) { |
411 |
CloudServersException cse = new CloudServersException();
|
412 |
cse.setMessage(e.getLocalizedMessage()); |
413 |
throw cse;
|
414 |
} catch (FactoryConfigurationError e) { |
415 |
CloudServersException cse = new CloudServersException();
|
416 |
cse.setMessage(e.getLocalizedMessage()); |
417 |
throw cse;
|
418 |
} |
419 |
return bundle;
|
420 |
} |
421 |
|
422 |
public HttpBundle setSessionPersistence(LoadBalancer loadBalancer,
|
423 |
String setting) throws CloudServersException { |
424 |
HttpResponse resp = null;
|
425 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
426 |
|
427 |
HttpPut put = new HttpPut(LoadBalancer.getRegionUrl(loadBalancer
|
428 |
.getRegion()) |
429 |
+ Account.getAccount().getAccountId() |
430 |
+ "/loadbalancers/"
|
431 |
+ loadBalancer.getId() |
432 |
+ "/sessionpersistence");
|
433 |
|
434 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
435 |
put.addHeader("Content-Type", "application/xml"); |
436 |
|
437 |
String xml = "<sessionPersistence xmlns=\"http://docs.openstack.org/loadbalancers/api/v1.0\" persistenceType=\"" |
438 |
+ setting + "\"/>";
|
439 |
|
440 |
Log.d("info", "session persist xml is: " + xml); |
441 |
|
442 |
StringEntity tmp = null;
|
443 |
try {
|
444 |
tmp = new StringEntity(xml);
|
445 |
} catch (UnsupportedEncodingException e) { |
446 |
CloudServersException cse = new CloudServersException();
|
447 |
cse.setMessage(e.getLocalizedMessage()); |
448 |
throw cse;
|
449 |
} |
450 |
|
451 |
put.setEntity(tmp); |
452 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
453 |
|
454 |
HttpBundle bundle = new HttpBundle();
|
455 |
bundle.setCurlRequest(put); |
456 |
|
457 |
try {
|
458 |
resp = httpclient.execute(put); |
459 |
bundle.setHttpResponse(resp); |
460 |
} catch (ClientProtocolException e) {
|
461 |
CloudServersException cse = new CloudServersException();
|
462 |
cse.setMessage(e.getLocalizedMessage()); |
463 |
throw cse;
|
464 |
} catch (IOException e) { |
465 |
CloudServersException cse = new CloudServersException();
|
466 |
cse.setMessage(e.getLocalizedMessage()); |
467 |
throw cse;
|
468 |
} catch (FactoryConfigurationError e) { |
469 |
CloudServersException cse = new CloudServersException();
|
470 |
cse.setMessage(e.getLocalizedMessage()); |
471 |
throw cse;
|
472 |
} |
473 |
return bundle;
|
474 |
} |
475 |
|
476 |
public HttpBundle disableSessionPersistence(LoadBalancer loadBalancer)
|
477 |
throws CloudServersException {
|
478 |
HttpResponse resp = null;
|
479 |
CustomHttpClient httpclient = new CustomHttpClient(context);
|
480 |
|
481 |
HttpDelete delete = new HttpDelete(
|
482 |
LoadBalancer.getRegionUrl(loadBalancer.getRegion()) |
483 |
+ Account.getAccount().getAccountId() |
484 |
+ "/loadbalancers/" + loadBalancer.getId()
|
485 |
+ "/sessionpersistence");
|
486 |
|
487 |
delete.addHeader("X-Auth-Token", Account.getAccount().getAuthToken());
|
488 |
|
489 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
490 |
|
491 |
HttpBundle bundle = new HttpBundle();
|
492 |
bundle.setCurlRequest(delete); |
493 |
|
494 |
try {
|
495 |
resp = httpclient.execute(delete); |
496 |
bundle.setHttpResponse(resp); |
497 |
} catch (ClientProtocolException e) {
|
498 |
CloudServersException cse = new CloudServersException();
|
499 |
cse.setMessage(e.getLocalizedMessage()); |
500 |
throw cse;
|
501 |
} catch (IOException e) { |
502 |
CloudServersException cse = new CloudServersException();
|
503 |
cse.setMessage(e.getLocalizedMessage()); |
504 |
throw cse;
|
505 |
} catch (FactoryConfigurationError e) { |
506 |
CloudServersException cse = new CloudServersException();
|
507 |
cse.setMessage(e.getLocalizedMessage()); |
508 |
throw cse;
|
509 |
} |
510 |
return bundle;
|
511 |
} |
512 |
|
513 |
} |