Package org.jboss.messaging.core

Examples of org.jboss.messaging.core.Queue


     
      while (iter.hasNext())
      {
         Binding binding = (Binding)iter.next();
        
         Queue queue = binding.getQueue();
        
         if (type == ALL || (type == DURABLE && queue.isRecoverable()) || (type == NON_DURABLE && !queue.isRecoverable()))
         {        
            String subName = null;
            String clientID = null;
           
            if (queue.isRecoverable())
            {
               MessageQueueNameHelper helper = MessageQueueNameHelper.createHelper(queue.getName());
               subName = helper.getSubName();
               clientID = helper.getClientId();
            }
           
            SubscriptionInfo info = new SubscriptionInfo(queue.getName(), queue.isRecoverable(), subName, clientID,
                     queue.getFilter() == null ? null : queue.getFilter().getFilterString(), queue.getMessageCount(), queue.getMaxSize());
           
            subs.add(info);
         }
      }
     
View Full Code Here


      Iterator iter = bindings.iterator();
      while (iter.hasNext())
      {
         Binding binding = (Binding)iter.next();
        
         Queue queue = binding.getQueue();
        
         if (type == ALL || (type == DURABLE && queue.isRecoverable())
                  || (type == NON_DURABLE && !queue.isRecoverable()))
         {
           
            String filterString = queue.getFilter() != null ? binding.getQueue().getFilter().getFilterString() : null;
                    
            String subName = null;
            String clientID = null;
           
            if (queue.isRecoverable())
            {
               MessageQueueNameHelper helper = MessageQueueNameHelper.createHelper(queue.getName());
               subName = helper.getSubName();
               clientID = helper.getClientId();
            }
           
            sb.append("<tr><td>").append(queue.getName()).append("</td>");
            sb.append("<td>").append(queue.isRecoverable() ? "Durable" : "Non Durable").append("</td>");
            sb.append("<td>").append(subName != null ? subName : "").append("</td>");
            sb.append("<td>").append(clientID != null ? clientID : "").append("</td>");
            sb.append("<td>").append(filterString != null ? filterString : "").append("</td>");
            sb.append("<td>").append(queue.getMessageCount()).append("</td>");
            sb.append("<td>").append(queue.getMaxSize()).append("</td>");
            sb.append("</tr>");
         }
      }
      sb.append("</table>");
     
View Full Code Here

      }
   }

   public synchronized Queue getDefaultDLQInstance() throws Exception
   {
      Queue dlq = null;
     
      if (defaultDLQObjectName != null)
      {
         ManagedQueue dest = null;
        
View Full Code Here

      return dlq;
   }
  
   public synchronized Queue getDefaultExpiryQueueInstance() throws Exception
   {
      Queue expiryQueue = null;
     
      if (defaultExpiryQueueObjectName != null)
      {
         ManagedQueue dest = null;
        
View Full Code Here

        
         if (binding != null)
         {
            try
            {
               Queue queue = binding.getQueue();
               if (!queue.isClustered())
               {
                  postOffice.unbindQueue(queue.getName());
               }
               else
               {
                  ((ClusteredPostOffice)postOffice).unbindClusteredQueue(queue.getName());
               }
            }
            catch (Throwable t)
            {
               throw new Exception("Failed to unbind queue", t);
View Full Code Here

            while (iter.hasNext())
            {
               Binding bb = (Binding)iter.next();

               Queue q = bb.getQueue();

               //Only send stats for clustered queues
              
               if (q instanceof ClusteredQueue)
               {              
                  if (q.isActive())
                  {
                     QueueStats stats = ((ClusteredQueue)q).getStats();
     
                     if (stats != null)
                     {
View Full Code Here

               if (del != null && del.isSelectorAccepted())
               {
                  routed = true;

                  Queue queue = (Queue)del.getObserver();

                  if (queue.isClustered())
                  {
                     ClusteredQueue cq = (ClusteredQueue)queue;
                    
                     if (trace) { log.trace(this + " successfully routed message to " + (cq.isLocal() ? "LOCAL"  : "REMOTE") + " destination '" + cq.getName() + "' on node " + cq.getNodeId()); }
                    
                     if (router.getNumberOfReceivers() > 1)
                     {
                        // We have now chosen which one will receive the message so we need to add this
                        // information to a map which will get sent when casting - so the the queue on
                        // the receiving node knows whether to receive the message.
  
                        if (queueNameNodeIdMap == null)
                        {
                           queueNameNodeIdMap = new HashMap();
                        }
  
                        queueNameNodeIdMap.put(queue.getName(), new Integer(cq.getNodeId()));
                     }
  
                     if (!cq.isLocal())
                     {
                        // We need to send the message remotely, count recipients so we know whether
                        // to unicast or multicast
                        numberRemote++;
                        lastNodeId = cq.getNodeId();
                        lastChannelId = queue.getChannelID();
                     }
                  }
                  else
                  {
                     if (trace) { log.trace(this + " successfully routed message to non clustered destination '" + queue.getName()); }
                  }
               }
            }

            // Now we've sent the message to any local queues, we might also need to send the
View Full Code Here

   //we know all the params
   protected Binding createBinding(int nodeID, Condition condition, String queueName,
                                   long channelId, Filter filter, boolean durable,
                                   boolean isClustered)
   {
      Queue queue;

      if (isClustered)
      {
         if (nodeID == currentNodeId)
         {
View Full Code Here

         while (iter2.hasNext())
         {
            Binding binding = (Binding)iter2.next();

            Queue queue = binding.getQueue();
           
            //we only replicate the clustered queues
           
            if (queue.isClustered())
            {
               BindingInfo info = new BindingInfo(binding.getNodeID(), queue.getName(),
                                                  binding.getCondition().toText(),
                                                  queue.getFilter() == null ? null : queue.getFilter().getFilterString(),
                                                  queue.getChannelID(),
                                                  queue.isRecoverable());
              
               bindings.add(info);
            }
         }
      }
View Full Code Here

               if (binding.getNodeID() != this.currentNodeId)
               {
                  throw new IllegalStateException("Local post office has foreign bindings!");
               }

               Queue queue = binding.getQueue();

               Delivery del = queue.handle(null, ref, tx);

               if (del != null && del.isSelectorAccepted())
               {
                  routed = true;
               }
View Full Code Here

TOP

Related Classes of org.jboss.messaging.core.Queue

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.