Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPCscSubscribeCall


      ISubscriptionCallback callback, int oti) throws Exception {
    // cascaded client not subscribed - subscribe
    CascadedPublishService cascPublishService = cascClient.getPublishService();
    // adapt NO_DATA_INTERVAL for cascaded client
    msgToForward.setHeader(SCMPHeaderAttributeKey.NO_DATA_INTERVAL, cascPublishService.getNoDataIntervalSeconds());
    SCMPCscSubscribeCall cscSubscribeCall = new SCMPCscSubscribeCall(this.requester, msgToForward);

    // set cascaded mask in message
    String tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.CASCADED_MASK);
    if (tmpCscMask == null) {
      // its the case if a client is subscribing directly
      tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
    }
    SubscriptionMask currentSubscriptionMask = cascClient.getSubscriptionMask();
    if (currentSubscriptionMask != null) {
      // cascaded client already has subscribed clients, figure out combined mask
      tmpCscMask = SubscriptionMask.masking(currentSubscriptionMask, tmpCscMask);
    }
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, tmpCscMask);
    CscSubscribeInactiveCascClientCallback cscCallback = new CscSubscribeInactiveCascClientCallback(callback, cascClient,
        tmpCscMask);
    cscSubscribeCall.invoke(cscCallback, oti);
  }
View Full Code Here


    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
    String clientMaskString = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
    SubscriptionMask cascClientMask = cascClient.getSubscriptionMask();
    String cascadedMask = SubscriptionMask.masking(cascClientMask, clientMaskString);
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
    SCMPCscSubscribeCall subscribeCall = new SCMPCscSubscribeCall(this.requester, msgToForward);
    subscribeCall.invoke(callback, oti);
  }
View Full Code Here

      ISubscriptionCallback callback, int oti) throws Exception {
    // cascaded client not subscribed - subscribe
    CascadedPublishService cascPublishService = cascClient.getPublishService();
    // adapt NO_DATA_INTERVAL for cascaded client
    msgToForward.setHeader(SCMPHeaderAttributeKey.NO_DATA_INTERVAL, cascPublishService.getNoDataIntervalSeconds());
    SCMPCscSubscribeCall cscSubscribeCall = new SCMPCscSubscribeCall(this.requester, msgToForward);

    // set cascaded mask in message
    String tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.CASCADED_MASK);
    if (tmpCscMask == null) {
      // its the case if a client is subscribing directly
      tmpCscMask = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
    }
    SubscriptionMask currentSubscriptionMask = cascClient.getSubscriptionMask();
    if (currentSubscriptionMask != null) {
      // cascaded client already has subscribed clients, figure out combined mask
      tmpCscMask = SubscriptionMask.masking(currentSubscriptionMask, tmpCscMask);
    }
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, tmpCscMask);
    CscSubscribeInactiveCascClientCallback cscCallback = new CscSubscribeInactiveCascClientCallback(callback, cascClient,
        tmpCscMask);
    cscSubscribeCall.invoke(cscCallback, oti);
  }
View Full Code Here

    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
    String clientMaskString = msgToForward.getHeader(SCMPHeaderAttributeKey.MASK);
    SubscriptionMask cascClientMask = cascClient.getSubscriptionMask();
    String cascadedMask = SubscriptionMask.masking(cascClientMask, clientMaskString);
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
    SCMPCscSubscribeCall subscribeCall = new SCMPCscSubscribeCall(this.requester, msgToForward);
    subscribeCall.invoke(callback, oti);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.call.SCMPCscSubscribeCall

Copyright © 2018 www.massapicom. 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.