Search in sources :

Example 1 with CBDescOut

use of alma.ACS.CBDescOut in project ACS by ACS-Community.

the class ResponderUtil method respond.

/**
	 * @param exc
	 * @param cb
	 * @param descIn
	 */
public static void respond(Exception exc, CBlongSeq cb, CBDescIn descIn) {
    Completion completion = ResponderUtil.giveCompletion(exc);
    CBDescOut cbDescOut = ResponderUtil.giveDescOut(descIn);
    cb.done(new int[] {}, completion, cbDescOut);
}
Also used : Completion(alma.ACSErr.Completion) MyAcsJCompletion(alma.acs.callbacks.Objects.MyAcsJCompletion) CBDescOut(alma.ACS.CBDescOut)

Example 2 with CBDescOut

use of alma.ACS.CBDescOut in project ACS by ACS-Community.

the class ResponderUtil method respond.

/**
	 * @param exc
	 * @param cb
	 * @param descIn
	 */
public static void respond(Exception exc, CBstring cb, CBDescIn descIn) {
    Completion completion = ResponderUtil.giveCompletion(exc);
    CBDescOut cbDescOut = ResponderUtil.giveDescOut(descIn);
    cb.done("", completion, cbDescOut);
}
Also used : Completion(alma.ACSErr.Completion) MyAcsJCompletion(alma.acs.callbacks.Objects.MyAcsJCompletion) CBDescOut(alma.ACS.CBDescOut)

Example 3 with CBDescOut

use of alma.ACS.CBDescOut in project ACS by ACS-Community.

the class ResponderUtil method respond.

/**
	 * @param returnValue
	 * @param cb
	 * @param descIn
	 */
public static void respond(String[] returnValue, CBstringSeq cb, CBDescIn descIn) {
    Completion completion = ResponderUtil.giveCompletion();
    CBDescOut cbDescOut = ResponderUtil.giveDescOut(descIn);
    cb.done(returnValue, completion, cbDescOut);
}
Also used : Completion(alma.ACSErr.Completion) MyAcsJCompletion(alma.acs.callbacks.Objects.MyAcsJCompletion) CBDescOut(alma.ACS.CBDescOut)

Example 4 with CBDescOut

use of alma.ACS.CBDescOut in project ACS by ACS-Community.

the class ResponderUtil method respond.

/**
	 * @param returnValue
	 * @param cb
	 * @param descIn
	 */
public static void respond(int returnValue, CBlong cb, CBDescIn descIn) {
    Completion completion = ResponderUtil.giveCompletion();
    CBDescOut cbDescOut = ResponderUtil.giveDescOut(descIn);
    cb.done(returnValue, completion, cbDescOut);
}
Also used : Completion(alma.ACSErr.Completion) MyAcsJCompletion(alma.acs.callbacks.Objects.MyAcsJCompletion) CBDescOut(alma.ACS.CBDescOut)

Example 5 with CBDescOut

use of alma.ACS.CBDescOut 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

CBDescOut (alma.ACS.CBDescOut)16 Completion (alma.ACSErr.Completion)13 MyAcsJCompletion (alma.acs.callbacks.Objects.MyAcsJCompletion)12 CBlong (alma.ACS.CBlong)2 AcsJException (alma.acs.exceptions.AcsJException)2 AcsJNoPermissionEx (alma.maciErrType.wrappers.AcsJNoPermissionEx)2 CBDescIn (alma.ACS.CBDescIn)1 CBlongPOA (alma.ACS.CBlongPOA)1 AcsJUnexpectedExceptionEx (alma.ACSErrTypeCommon.wrappers.AcsJUnexpectedExceptionEx)1 AcsJUnknownEx (alma.ACSErrTypeCommon.wrappers.AcsJUnknownEx)1 ACSErrOKAcsJCompletion (alma.ACSErrTypeOK.wrappers.ACSErrOKAcsJCompletion)1 AcsJCompletion (alma.acs.exceptions.AcsJCompletion)1 CannotActivateComponentEx (alma.maciErrType.CannotActivateComponentEx)1 ComponentDeactivationFailedEx (alma.maciErrType.ComponentDeactivationFailedEx)1 ComponentDeactivationUncleanEx (alma.maciErrType.ComponentDeactivationUncleanEx)1 NoPermissionEx (alma.maciErrType.NoPermissionEx)1 AcsJCannotActivateComponentEx (alma.maciErrType.wrappers.AcsJCannotActivateComponentEx)1 AcsJComponentDeactivationFailedEx (alma.maciErrType.wrappers.AcsJComponentDeactivationFailedEx)1 AcsJComponentDeactivationUncleanEx (alma.maciErrType.wrappers.AcsJComponentDeactivationUncleanEx)1 BadParametersException (com.cosylab.acs.maci.BadParametersException)1