use of alma.ACS.CBlongPOA in project ACS by ACS-Community.
the class ManagerProxy method releaseComponentAsync.
public void releaseComponentAsync(int id, URI curl, LongCompletionCallback callback) throws AcsJNoPermissionEx, AcsJBadParameterEx {
try {
final LongCompletionCallback fcallback = callback;
CBlongPOA cbo = new CBlongPOA() {
public boolean negotiate(long time_to_transmit, CBDescOut desc) {
return false;
}
public void working(int value, Completion c, CBDescOut desc) {
// noop
}
public void done(int value, Completion c, CBDescOut desc) {
if (c.code == 0 && c.type == 0)
fcallback.done(value);
else
// TODO maybe convert to specific exceptions
fcallback.failed(value, AcsJCompletion.fromCorbaCompletion(c).getAcsJException());
}
};
CBDescIn desc = new CBDescIn(0, 0, 0);
manager.release_component_async(id, curl.toString(), cbo._this(), desc);
} catch (NoPermissionEx nop) {
throw new AcsJNoPermissionEx(nop);
}
}
Aggregations