Examples of invoke()


Examples of org.serviceconnector.call.SCMPCscAbortSubscriptionCall.invoke()

        // cascaded client still has client subscriptions set cascaded mask
        String cascadedMask = cascClient.evalSubscriptionMaskFromClientSubscriptions();
        msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
        cascClient.setSubscriptionMask(new SubscriptionMask(cascadedMask));
        SCMPCscAbortSubscriptionCall cscAbortCall = new SCMPCscAbortSubscriptionCall(this.requester, msgToForward);
        cscAbortCall.invoke(callback, oti);
        return;
      }
      // no client subscription left - destroy client after XAB
      SCMPCscAbortSubscriptionCall cscAbortCall = new SCMPCscAbortSubscriptionCall(this.requester, msgToForward);
      cscAbortCall.invoke(callback, oti);
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscChangeSubscriptionCall.invoke()

    String clientMaskString = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
    SubscriptionMask cascClientMask = cascClient.getSubscriptionMask();
    String cascadedMask = SubscriptionMask.masking(cascClientMask, clientMaskString);
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
    SCMPCscChangeSubscriptionCall cscChangeSubscriptionCall = new SCMPCscChangeSubscriptionCall(this.requester, msgToForward);
    cscChangeSubscriptionCall.invoke(callback, oti);
  }

  /**
   * Unsubscribe cascaded SC with active cascaded client.
   *
 
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscCreateSessionCall.invoke()

   *            the timeout milliseconds
   */
  public void createSession(SCMPMessage msgToForward, ISCMPMessageCallback callback, int timeoutMillis) {
    SCMPCscCreateSessionCall createSessionCall = new SCMPCscCreateSessionCall(this.requester, msgToForward);
    try {
      createSessionCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // create session failed
      callback.receive(e);
    }
  }
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscDeleteSessionCall.invoke()

   *            the timeout milliseconds
   */
  public void deleteSession(SCMPMessage msgToForward, ISCMPMessageCallback callback, int timeoutMillis) {
    SCMPCscDeleteSessionCall deleteSessionCall = new SCMPCscDeleteSessionCall(this.requester, msgToForward);
    try {
      deleteSessionCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // delete session failed
      callback.receive(e);
    }
  }
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscExecuteCall.invoke()

   *            the timeout milliseconds
   */
  public void execute(SCMPMessage msgToForward, ISCMPMessageCallback callback, int timeoutMillis) {
    SCMPCscExecuteCall executeCall = new SCMPCscExecuteCall(this.requester, msgToForward);
    try {
      executeCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // send data failed
      callback.receive(e);
    }
  }
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscSubscribeCall.invoke()

      tmpCscMask = SubscriptionMask.masking(currentSubscriptionMask, tmpCscMask);
    }
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, tmpCscMask);
    CscSubscribeInactiveCascClientCallback cscCallback = new CscSubscribeInactiveCascClientCallback(callback, cascClient,
        tmpCscMask);
    cscSubscribeCall.invoke(cscCallback, oti);
  }

  /**
   * Subscribe cascaded SC with active cascaded client.
   *
 
View Full Code Here

Examples of org.serviceconnector.call.SCMPCscUnsubscribeCall.invoke()

        // cascaded client can unsubscribe himself
        SCMPCscUnsubscribeCall cscUnsubscribeCall = new SCMPCscUnsubscribeCall(this.requester, msgToForward);
        // set cascaded client subscriptonId
        msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
        try {
          cscUnsubscribeCall.invoke(callback, oti);
        } finally {
          cascClient.setSubscribed(false);
          cascClient.destroy();
        }
        return;
View Full Code Here

Examples of org.serviceconnector.call.SCMPDeRegisterServerCall.invoke()

      // get communicator lock - avoids interference with other clients or scServers
      try {
        SCMPDeRegisterServerCall deRegisterServerCall = new SCMPDeRegisterServerCall(this.requester, this.serviceName);
        SCServerCallback callback = new SCServerCallback(true);
        try {
          deRegisterServerCall.invoke(callback, Constants.DEFAULT_OPERATION_TIMEOUT_SECONDS
              * Constants.SEC_TO_MILLISEC_FACTOR);
        } catch (Exception e) {
          throw new SCServiceException("Deregister server failed. ", e);
        }
        SCMPMessage reply = callback.getMessageSync(Constants.DEFAULT_OPERATION_TIMEOUT_SECONDS
View Full Code Here

Examples of org.serviceconnector.call.SCMPDetachCall.invoke()

    // 2. initialize call & invoke
    try {
      SCServiceCallback callback = new SCServiceCallback(true);
      SCMPDetachCall detachCall = new SCMPDetachCall(this.requester);
      try {
        detachCall.invoke(callback, operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
      } catch (Exception e) {
        throw new SCServiceException("Detach client failed. ", e);
      }
      // 3. receiving reply and error handling
      SCMPMessage reply = callback.getMessageSync(operationTimeoutSeconds * Constants.SEC_TO_MILLISEC_FACTOR);
 
View Full Code Here

Examples of org.serviceconnector.call.SCMPEchoCall.invoke()

   *            the timeout milliseconds
   */
  public void echo(SCMPMessage msgToForward, ISCMPMessageCallback callback, int timeoutMillis) {
    SCMPEchoCall echoCall = new SCMPEchoCall(this.requester, msgToForward);
    try {
      echoCall.invoke(callback, (int) (this.operationTimeoutMultiplier * timeoutMillis));
    } catch (Exception e) {
      // echo failed
      callback.receive(e);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.