Examples of changeSubscription()


Examples of org.serviceconnector.api.cln.SCPublishService.changeSubscription()

      } else if (getMethodName() == "changeSubscription_toMaskWhiteSpace_passes") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
        subscibeMessage.setMask(" ");
        service.changeSubscription(subscibeMessage);
        service.unsubscribe();

      } else if (getMethodName() == "subscribeUnsubscribe_twice_isSubscribedThenNot") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));
View Full Code Here

Examples of org.serviceconnector.api.cln.SCPublishService.changeSubscription()

      } else if (getMethodName() == "changeSubscription_twice_passes") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));

        service.changeSubscription(subscibeMessage);
        service.changeSubscription(subscibeMessage);

        service.unsubscribe();

      } else if (getMethodName() == "unsubscribe_serviceNameValid_notSubscribedEmptySessionId") {
View Full Code Here

Examples of org.serviceconnector.api.cln.SCPublishService.changeSubscription()

      } else if (getMethodName() == "changeSubscription_twice_passes") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
        service.subscribe(subscibeMessage, new TestPublishServiceMessageCallback(service));

        service.changeSubscription(subscibeMessage);
        service.changeSubscription(subscibeMessage);

        service.unsubscribe();

      } else if (getMethodName() == "unsubscribe_serviceNameValid_notSubscribedEmptySessionId") {
        SCPublishService service = sc.newPublishService(TestConstants.pubServiceName1);
View Full Code Here

Examples of org.serviceconnector.server.StatefulServer.changeSubscription()

      // reset ipList&msgType, might have been modified in below change subscription try
      reqMessage.setHeader(SCMPHeaderAttributeKey.IP_ADDRESS_LIST, ipAddressList);
      reqMessage.setMessageType(this.getKey());
      callback = new ClnChangeSubscriptionCommandCallback(request, response, responderCallback, subscription);
      try {
        server.changeSubscription(reqMessage, callback, otiOnSCMillis
            - (i * Constants.WAIT_FOR_FREE_CONNECTION_INTERVAL_MILLIS));
        // no exception has been thrown - get out of wait loop
        break;
      } catch (ConnectionPoolBusyException ex) {
        LOGGER.debug("ConnectionPoolBusyException caught in wait mec of change subscription, tries left=" + tries);
View Full Code Here

Examples of org.serviceconnector.server.StatefulServer.changeSubscription()

      reqMessage.setHeader(SCMPHeaderAttributeKey.IP_ADDRESS_LIST, ipAddressList);
      reqMessage.setMessageType(this.getKey());
      callback = new CscChangeSubscriptionCallbackForCasc(request, response, responderCallback, cascSubscription,
          cascadedSCMask);
      try {
        server.changeSubscription(reqMessage, callback, otiOnSCMillis
            - (i * Constants.WAIT_FOR_FREE_CONNECTION_INTERVAL_MILLIS));
        // no exception has been thrown - get out of wait loop
        break;
      } catch (ConnectionPoolBusyException ex) {
        LOGGER.debug("ConnectionPoolBusyException caught in wait mec of csc change subscription, tries left=" + tries);
View Full Code Here

Examples of org.serviceconnector.server.StatefulServer.changeSubscription()

      // reset ipList&msgType, might have been modified in below change subscription try
      reqMessage.setHeader(SCMPHeaderAttributeKey.IP_ADDRESS_LIST, ipAddressList);
      reqMessage.setMessageType(this.getKey());
      callback = new ClnChangeSubscriptionCommandCallback(request, response, responderCallback, subscription);
      try {
        server.changeSubscription(reqMessage, callback, otiOnSCMillis
            - (i * Constants.WAIT_FOR_FREE_CONNECTION_INTERVAL_MILLIS));
        // no exception has been thrown - get out of wait loop
        break;
      } catch (ConnectionPoolBusyException ex) {
        LOGGER.debug("ConnectionPoolBusyException caught in wait mec of change subscription, tries left=" + tries);
View Full Code Here

Examples of org.serviceconnector.server.StatefulServer.changeSubscription()

      reqMessage.setHeader(SCMPHeaderAttributeKey.IP_ADDRESS_LIST, ipAddressList);
      reqMessage.setMessageType(this.getKey());
      callback = new CscChangeSubscriptionCallbackForCasc(request, response, responderCallback, cascSubscription,
          cascadedSCMask);
      try {
        server.changeSubscription(reqMessage, callback, otiOnSCMillis
            - (i * Constants.WAIT_FOR_FREE_CONNECTION_INTERVAL_MILLIS));
        // no exception has been thrown - get out of wait loop
        break;
      } catch (ConnectionPoolBusyException ex) {
        LOGGER.debug("ConnectionPoolBusyException caught in wait mec of csc change subscription, tries left=" + tries);
View Full Code Here

Examples of org.wso2.carbon.billing.core.DataAccessManager.changeSubscription()

        return dataAccessManager.getItemIdWithName(name, parentId);
    }

    public boolean changeSubscription (int customerId, String subscriptionPlan) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        return dataAccessManager.changeSubscription(customerId, subscriptionPlan);           
    }

    public Subscription[] getInactiveSubscriptionsOfCustomer(int customerId) throws Exception {
        DataAccessManager dataAccessManager = Util.getDataAccessManager();
        List<Subscription> subscriptions = dataAccessManager.getInactiveSubscriptionsOfCustomer(customerId);
View Full Code Here

Examples of org.wso2.carbon.billing.mgt.services.BillingDataAccessService.changeSubscription()

        try{
            BillingDataAccessService billingDataAccessService = new BillingDataAccessService();
            Subscription currentSubscription = billingDataAccessService.getActiveSubscriptionOfCustomer(infoBean.getTenantId());
            if(currentSubscription != null && currentSubscription.getSubscriptionPlan() != null){
                if(!currentSubscription.getSubscriptionPlan().equals(usagePlan)){
                    boolean updated = billingDataAccessService.changeSubscription(infoBean.getTenantId(), usagePlan);
                    if(updated){
                        log.debug("Usage plan was changed successfully from " + currentSubscription.getSubscriptionPlan() +
                                " to " + usagePlan);
                    }else{
                        log.debug("Usage plan was not changed");
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.