use of alma.ACSErrTypeOK.wrappers.ACSErrOKAcsJCompletion in project ACS by ACS-Community.
the class ManagerProxyImpl method release_component_async.
public void release_component_async(int id, String component_url, CBlong callback, CBDescIn desc) throws NoPermissionEx {
pendingRequests.incrementAndGet();
try {
// simply release Component
URI uri = null;
if (component_url != null)
uri = CURLHelper.createURI(component_url);
final CBlong fcallback = callback;
final CBDescOut descOut = new CBDescOut(0, desc.id_tag);
LongCompletionCallback lcc = null;
if (callback != null) {
lcc = new LongCompletionCallback() {
public void failed(int result, Throwable exception) {
if (exception instanceof AcsJException) {
AcsJException aex = (AcsJException) exception;
fcallback.done(result, aex.toAcsJCompletion().toCorbaCompletion(), descOut);
} else {
AcsJUnexpectedExceptionEx uex = new AcsJUnexpectedExceptionEx(exception);
fcallback.done(result, uex.toAcsJCompletion().toCorbaCompletion(), descOut);
}
}
public void done(int result) {
fcallback.done(result, new ACSErrOKAcsJCompletion().toCorbaCompletion(), descOut);
}
};
}
manager.releaseComponentAsync(id, uri, lcc);
} catch (AcsJNoPermissionEx nop) {
reportException(nop);
// rethrow CORBA specific
throw nop.toNoPermissionEx();
} catch (URISyntaxException usi) {
BadParametersException hbpe = new BadParametersException(usi.getMessage(), usi);
reportException(hbpe);
// rethrow CORBA specific
throw new BAD_PARAM(usi.getMessage());
} catch (BadParametersException bpe) {
BadParametersException hbpe = new BadParametersException(bpe.getMessage(), bpe);
reportException(hbpe);
// rethrow CORBA specific
throw new BAD_PARAM(bpe.getMessage());
} catch (NoResourcesException nre) {
NoResourcesException hnre = new NoResourcesException(nre.getMessage(), nre);
reportException(hnre);
// rethrow CORBA specific
throw new NO_RESOURCES(nre.getMessage());
} catch (Throwable ex) {
CoreException hce = new CoreException(ex.getMessage(), ex);
reportException(hce);
// rethrow CORBA specific
throw new UNKNOWN(ex.getMessage());
} finally {
pendingRequests.decrementAndGet();
}
}
Aggregations