Package org.xmlBlaster.engine

Examples of org.xmlBlaster.engine.SubscriptionInfo


    * Invoked when a subscriber is added to the TopicHandler
    * @param subscriptionInfo
    */
   public void subscriptionAdd(SubscriptionEvent e)
      throws XmlBlasterException {
      SubscriptionInfo subscriptionInfo = e.getSubscriptionInfo();
      if (log.isLoggable(Level.FINER)) log.finer("onAddSubscriber");
      DispatchManager dispatchManager = getDispatchManager(subscriptionInfo);
      if (dispatchManager != null) dispatchManager.addConnectionStatusListener(this);
      this.isReady = true;
      toRunning();
View Full Code Here


   /**
    * Invoked when a subscriber is removed from the TopicHandler
    * @param subscriptionInfo
    */
   public void subscriptionRemove(SubscriptionEvent e) throws XmlBlasterException {
      SubscriptionInfo subscriptionInfo = e.getSubscriptionInfo();
      if (log.isLoggable(Level.FINER)) log.finer("onRemoveSubscriber");
      DispatchManager dispatchManager = getDispatchManager(subscriptionInfo);
      if (dispatchManager != null) dispatchManager.removeConnectionStatusListener(this);
   }
View Full Code Here

         // If we would iterate over the map directly we can risk a java.util.ConcurrentModificationException
         // when one of the callback fails and the entry is removed by the callback worker thread

         SubscriptionInfo[] subInfoArr = (SubscriptionInfo[])subInfoList.toArray(new SubscriptionInfo[subInfoList.size()]);
         for (int ii=0; ii<subInfoArr.length; ii++) {
            SubscriptionInfo sub = subInfoArr[ii];
            if (TopicHandler.isDirtyRead(sub, msgUnitWrapper)) {
               log.severe("ConsumableQueuePlugin used together with 'dirtyRead' is not supported");
               TopicHandler topicHandler = this.serverScope.getTopicAccessor().access(this.topicId);
               if (topicHandler == null) return true;
               try {
                  I_Queue srcQueue = topicHandler.getHistoryQueue();
                  if (srcQueue != null) srcQueue.removeRandom(entry);
               }
               finally {
                  this.serverScope.getTopicAccessor().release(topicHandler);
               }
               return true; // even if it has not been sent
            }
         }  

         for (int ii=0; ii<subInfoArr.length; ii++) {
            SubscriptionInfo sub = subInfoArr[ii];
           
            if (!TopicHandler.subscriberMayReceiveIt(sub, msgUnitWrapper)) continue;
            //Has no effect:
            //if (!this.topicHandler.checkIfAllowedToSend(null, sub)) continue;

            // this is specific for this plugin
            if (sub.getSessionInfo().getDispatchManager() == null) continue;
            if (!sub.getSessionInfo().getDispatchManager().getDispatchConnectionsHandler().isAlive()) continue;

            try {

               try {
                  TopicHandler topicHandler = this.serverScope.getTopicAccessor().access(this.topicId);
View Full Code Here

      else if (registerKey.equals(ContextNode.SUBSCRIPTION_MARKER_TAG)) { // "subscription"
         String subscriptionId = cmd.getUserNameLevel();
         if (subscriptionId == null || subscriptionId.length() < 1 || subscriptionId.startsWith("?"))
            throw new XmlBlasterException(glob, ErrorCode.USER_ILLEGALARGUMENT, ME, "Please pass a command which has a valid subscriptionId in '" + cmd.getCommand() + "' with '" + subscriptionId + "' is invalid");

         SubscriptionInfo subscriptionInfo = glob.getRequestBroker().getClientSubscriptions().getSubscription(subscriptionId);
         if (subscriptionInfo == null)
            throw new XmlBlasterException(glob, ErrorCode.USER_ILLEGALARGUMENT, ME, "Please pass a command which has a valid subscriptionId in '" + cmd.getCommand() + "' subscriptionId '" + subscriptionId + "' is unknown");

         String methodName = cmd.getFifthLevel();
         if (methodName == null || methodName.length() < 1)
View Full Code Here

      for (int i=0; i<holderList.size(); i++) {
         Holder holder = (Holder)holderList.get(i);

         // Pass subscribeQos or connectQos - clientProperties to exportMessage() in case there are
         // some interesting settings provided, for example a desired XSL transformation
         SubscriptionInfo subscriptionInfo = null;
         Map map = null;
         if (holder.subscriptionId != null) {
            subscriptionInfo = scope.getRequestBroker().getClientSubscriptions().getSubscription(holder.subscriptionId);
            if (subscriptionInfo != null)
               map = subscriptionInfo.getQueryQosDataClientProperties();
            //String xslFileName = subscriptionInfo.getQueryQosData().getClientProperty("__xslTransformerFileName", (String)null);
         }
         else {
            // todo: use map=ConnectQos.getClientProperties() as a map to pass to dataHolder
         }
View Full Code Here

TOP

Related Classes of org.xmlBlaster.engine.SubscriptionInfo

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.