org.apache.activemq.broker.region
Class QueueBrowserSubscription
java.lang.Object
org.apache.activemq.broker.region.AbstractSubscription
org.apache.activemq.broker.region.PrefetchSubscription
org.apache.activemq.broker.region.QueueSubscription
org.apache.activemq.broker.region.QueueBrowserSubscription
- All Implemented Interfaces:
- LockOwner, Subscription, SubscriptionRecovery
public class QueueBrowserSubscription
- extends QueueSubscription
Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
dequeueCounter, dispatchCounter, dispatched, dispatchLock, enqueueCounter, pending, pendingLock, prefetchExtension, scheduler, usageManager, usePrefetchExtension |
Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscription |
acknowledge, add, add, assertAckMatchesDispatched, countBeforeFull, createMessageDispatch, dispatch, dispatchPending, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPendingQueueSize, getPrefetchExtension, isFull, isHighWaterMark, isLowWaterMark, isRecoveryRequired, isUsePrefetchExtension, onDispatch, processMessageDispatchNotification, pullMessage, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPendingBatchSize, setUsePrefetchExtension, updateConsumerPrefetch |
Methods inherited from class org.apache.activemq.broker.region.AbstractSubscription |
addDestination, addRecoveredMessage, doAddRecoveredMessage, gc, getActiveMQDestination, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getInFlightUsage, getInfo, getObjectName, getPrefetchSize, getSelector, getSelectorExpression, isBrowser, isSlave, isSlowConsumer, matches, removeDestination, setCursorMemoryHighWaterMark, setObjectName, setPrefetchSize, setSelector, setSlowConsumer, unmatched |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
QueueBrowserSubscription
public QueueBrowserSubscription(Broker broker,
SystemUsage usageManager,
ConnectionContext context,
ConsumerInfo info)
throws javax.jms.InvalidSelectorException
- Throws:
javax.jms.InvalidSelectorException
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
destinationsAdded
public void destinationsAdded()
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
incrementQueueRef
public void incrementQueueRef()
decrementQueueRef
public void decrementQueueRef()
throws java.lang.Exception
- Throws:
java.lang.Exception
remove
public java.util.List<MessageReference> remove(ConnectionContext context,
Destination destination)
throws java.lang.Exception
- Description copied from interface:
Subscription
- The subscription will be no longer be receiving messages from the destination.
- Specified by:
remove
in interface Subscription
- Overrides:
remove
in class PrefetchSubscription
- Returns:
- a list of un-acked messages that were added to the subscription.
- Throws:
java.lang.Exception
Copyright © 2005-2016. All Rights Reserved.