Search in sources :

Example 1 with CBlongPOA

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);
    }
}
Also used : Completion(alma.ACSErr.Completion) AcsJCompletion(alma.acs.exceptions.AcsJCompletion) CBDescOut(alma.ACS.CBDescOut) AcsJNoPermissionEx(alma.maciErrType.wrappers.AcsJNoPermissionEx) CBlongPOA(alma.ACS.CBlongPOA) NoPermissionEx(alma.maciErrType.NoPermissionEx) AcsJNoPermissionEx(alma.maciErrType.wrappers.AcsJNoPermissionEx) CBDescIn(alma.ACS.CBDescIn)

Aggregations

CBDescIn (alma.ACS.CBDescIn)1 CBDescOut (alma.ACS.CBDescOut)1 CBlongPOA (alma.ACS.CBlongPOA)1 Completion (alma.ACSErr.Completion)1 AcsJCompletion (alma.acs.exceptions.AcsJCompletion)1 NoPermissionEx (alma.maciErrType.NoPermissionEx)1 AcsJNoPermissionEx (alma.maciErrType.wrappers.AcsJNoPermissionEx)1