Package org.serviceconnector.call

Examples of org.serviceconnector.call.SCMPCscUnsubscribeCall


      cascClient.removeClientSubscriptionId(msgToForward.getSessionId());

      Map<String, SubscriptionMask> clnSubscriptions = cascClient.getClientSubscriptionIds();
      if (clnSubscriptions.size() == 0) {
        // 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


      SCMPMessage message = new SCMPMessage();
      message.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
      message.setServiceName(cascClient.getServiceName());
      long msgSeqNr = cascClient.getMsgSequenceNr().incrementAndGetMsgSequenceNr();
      message.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSeqNr);
      SCMPCscUnsubscribeCall unsubscribeCall = new SCMPCscUnsubscribeCall(this.requester, message);
      unsubscribeCall.invoke(new CommandCallback(false), AppContext.getBasicConfiguration().getSrvAbortOTIMillis());
    } catch (Exception e) {
      LOGGER.warn("unsubscribing cascaded client failed service=" + cascClient.getServiceName() + " " + e.toString());
    }
  }
View Full Code Here

    // change mask of cascaded client in callback or keep it in case of an error
    // set cascaded subscriptonId
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
    String cascadedMask = cascClient.evalSubscriptionMaskFromClientSubscriptions();
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
    SCMPCscUnsubscribeCall cscUnsubscribeCall = new SCMPCscUnsubscribeCall(this.requester, msgToForward);
    cscUnsubscribeCall.invoke(callback, oti);
  }
View Full Code Here

      cascClient.removeClientSubscriptionId(msgToForward.getSessionId());

      Map<String, SubscriptionMask> clnSubscriptions = cascClient.getClientSubscriptionIds();
      if (clnSubscriptions.size() == 0) {
        // 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

      SCMPMessage message = new SCMPMessage(SCMPVersion.CURRENT);
      message.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
      message.setServiceName(cascClient.getServiceName());
      long msgSeqNr = cascClient.getMsgSequenceNr().incrementAndGetMsgSequenceNr();
      message.setHeader(SCMPHeaderAttributeKey.MESSAGE_SEQUENCE_NR, msgSeqNr);
      SCMPCscUnsubscribeCall unsubscribeCall = new SCMPCscUnsubscribeCall(this.requester, message);
      unsubscribeCall.invoke(new CommandCallback(false), AppContext.getBasicConfiguration().getSrvAbortOTIMillis());
    } catch (Exception e) {
      LOGGER.warn("unsubscribing cascaded client failed service=" + cascClient.getServiceName() + " " + e.toString());
    }
  }
View Full Code Here

    // change mask of cascaded client in callback or keep it in case of an error
    // set cascaded subscriptonId
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_SUBSCRIPTION_ID, cascClient.getSubscriptionId());
    String cascadedMask = cascClient.evalSubscriptionMaskFromClientSubscriptions();
    msgToForward.setHeader(SCMPHeaderAttributeKey.CASCADED_MASK, cascadedMask);
    SCMPCscUnsubscribeCall cscUnsubscribeCall = new SCMPCscUnsubscribeCall(this.requester, msgToForward);
    cscUnsubscribeCall.invoke(callback, oti);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.call.SCMPCscUnsubscribeCall

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.