org.apache.activemq.broker.region
Class QueueBrowserSubscription

java.lang.Object
  extended by org.apache.activemq.broker.region.AbstractSubscription
      extended by org.apache.activemq.broker.region.PrefetchSubscription
          extended by org.apache.activemq.broker.region.QueueSubscription
              extended by org.apache.activemq.broker.region.QueueBrowserSubscription
All Implemented Interfaces:
LockOwner, Subscription

public class QueueBrowserSubscription
extends QueueSubscription


Field Summary
 
Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscription
dispatched, pending, prefetchExtension
 
Fields inherited from class org.apache.activemq.broker.region.AbstractSubscription
broker, context, destinationFilter, destinations, info
 
Fields inherited from interface org.apache.activemq.broker.region.LockOwner
HIGH_PRIORITY_LOCK_OWNER
 
Constructor Summary
QueueBrowserSubscription(Broker broker, ConnectionContext context, ConsumerInfo info)
           
 
Method Summary
protected  void acknowledge(ConnectionContext context, MessageAck ack, MessageReference n)
          Since we are a browser we don't really remove the message from the queue.
 void browseDone()
           
protected  boolean canDispatch(MessageReference node)
          Use when a matched message is about to be dispatched to the client.
 boolean matches(MessageReference node, MessageEvaluationContext context)
          Is the subscription interested in the message?
 java.lang.String toString()
           
 
Methods inherited from class org.apache.activemq.broker.region.QueueSubscription
assignGroupToMe, destroy, dispatch, getLockPriority, isLockExclusive, onDispatch, sendToDLQ
 
Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscription
acknowledge, add, add, createMessageDispatch, dispatchMatched, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getPendingQueueSize, isFull, isHighWaterMark, isLowWaterMark, isRecoveryRequired, optimizePrefetch, processMessageDispatchNotification, pullMessage, remove, updateConsumerPrefetch
 
Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription
gc, getConsumerInfo, getContext, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, isSlaveBroker, matches, setObjectName, setSelector
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueueBrowserSubscription

public QueueBrowserSubscription(Broker broker,
                                ConnectionContext context,
                                ConsumerInfo info)
                         throws javax.jms.InvalidSelectorException
Throws:
javax.jms.InvalidSelectorException
Method Detail

canDispatch

protected boolean canDispatch(MessageReference node)
Description copied from class: PrefetchSubscription
Use when a matched message is about to be dispatched to the client.

Overrides:
canDispatch in class QueueSubscription
Returns:
false if the message should not be dispatched to the client (another sub may have already dispatched it for example).

toString

public java.lang.String toString()
Overrides:
toString in class QueueSubscription

browseDone

public void browseDone()
                throws java.lang.Exception
Throws:
java.lang.Exception

matches

public boolean matches(MessageReference node,
                       MessageEvaluationContext context)
                throws java.io.IOException
Description copied from interface: Subscription
Is the subscription interested in the message?

Specified by:
matches in interface Subscription
Overrides:
matches in class AbstractSubscription
Returns:
Throws:
java.io.IOException

acknowledge

protected void acknowledge(ConnectionContext context,
                           MessageAck ack,
                           MessageReference n)
                    throws java.io.IOException
Since we are a browser we don't really remove the message from the queue.

Overrides:
acknowledge in class QueueSubscription
Throws:
java.io.IOException


Copyright © 2010 Apache Software Foundation. All Rights Reserved.