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 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static org.slf4j.LoggerLOG- 
Fields inherited from class org.apache.activemq.broker.region.PrefetchSubscriptiondispatched, dispatchLock, pending, pendingLock, scheduler, usageManager
 - 
Fields inherited from class org.apache.activemq.broker.region.AbstractSubscriptionbroker, context, destinationFilter, destinations, info, prefetchExtension
 - 
Fields inherited from interface org.apache.activemq.broker.region.LockOwnerHIGH_PRIORITY_LOCK_OWNER
 
- 
 - 
Constructor SummaryConstructors Constructor Description QueueBrowserSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidacknowledge(ConnectionContext context, MessageAck ack, MessageReference n)Since we are a browser we don't really remove the message from the queue.booleanatMax()protected booleancanDispatch(MessageReference node)Use when a matched message is about to be dispatched to the client.voiddecrementQueueRef()voiddestinationsAdded()voidincrementQueueRef()booleanisDuplicate(MessageId messageId)booleanmatches(MessageReference node, MessageEvaluationContext context)Is the subscription interested in the message?List<MessageReference>remove(ConnectionContext context, Destination destination)The subscription will be no longer be receiving messages from the destination.voidsetMaxMessages(long max)StringtoString()- 
Methods inherited from class org.apache.activemq.broker.region.QueueSubscriptiondestroy, getLockPriority, isDropped, isLockExclusive
 - 
Methods inherited from class org.apache.activemq.broker.region.PrefetchSubscriptionacknowledge, add, add, assertAckMatchesDispatched, countBeforeFull, createMessageDispatch, dispatch, dispatchPending, getDequeueCounter, getDispatchedCounter, getDispatchedQueueSize, getEnqueueCounter, getInFlightSize, getMaxAuditDepth, getMaxProducersToAudit, getPending, getPendingMessageSize, getPendingQueueSize, isFull, isHighWaterMark, isLowWaterMark, isRecoveryRequired, onDispatch, processMessageDispatchNotification, pullMessage, remove, sendToDLQ, setMaxAuditDepth, setMaxProducersToAudit, setPending, setPendingBatchSize, setPrefetchSize, trackedInPendingTransaction, updateConsumerPrefetch
 - 
Methods inherited from class org.apache.activemq.broker.region.AbstractSubscriptionaddDestination, addRecoveredMessage, contractPrefetchExtension, decrementPrefetchExtension, doAddRecoveredMessage, expandPrefetchExtension, gc, getActiveMQDestination, getConsumedCount, getConsumerInfo, getContext, getCursorMemoryHighWaterMark, getDestinations, getInFlightMessageSize, getInFlightUsage, getInfo, getObjectName, getPrefetchExtension, getPrefetchSize, getSelector, getSelectorExpression, getSubscriptionStatistics, getTimeOfLastMessageAck, incrementConsumedCount, isBrowser, isSlowConsumer, isUsePrefetchExtension, isWildcard, matches, removeDestination, resetConsumedCount, setCursorMemoryHighWaterMark, setObjectName, setSelector, setSlowConsumer, setTimeOfLastMessageAck, setUsePrefetchExtension, unmatched, wakeupDestinationsForDispatch
 
- 
 
- 
- 
- 
Constructor Detail- 
QueueBrowserSubscriptionpublic QueueBrowserSubscription(Broker broker, SystemUsage usageManager, ConnectionContext context, ConsumerInfo info) throws JMSException - Throws:
- JMSException
 
 
- 
 - 
Method Detail- 
canDispatchprotected boolean canDispatch(MessageReference node) Description copied from class:PrefetchSubscriptionUse when a matched message is about to be dispatched to the client.- Overrides:
- canDispatchin class- QueueSubscription
- Returns:
- false if the message should not be dispatched to the client (another sub may have already dispatched it for example).
 
 - 
toStringpublic String toString() - Overrides:
- toStringin class- QueueSubscription
 
 - 
isDuplicatepublic boolean isDuplicate(MessageId messageId) 
 - 
matchespublic boolean matches(MessageReference node, MessageEvaluationContext context) throws IOException Description copied from interface:SubscriptionIs the subscription interested in the message?- Specified by:
- matchesin interface- Subscription
- Overrides:
- matchesin class- AbstractSubscription
- Returns:
- true if matching
- Throws:
- IOException
 
 - 
acknowledgeprotected void acknowledge(ConnectionContext context, MessageAck ack, MessageReference n) throws IOException Since we are a browser we don't really remove the message from the queue.- Overrides:
- acknowledgein class- QueueSubscription
- Throws:
- IOException
 
 - 
incrementQueueRefpublic void incrementQueueRef() 
 - 
removepublic List<MessageReference> remove(ConnectionContext context, Destination destination) throws Exception Description copied from interface:SubscriptionThe subscription will be no longer be receiving messages from the destination.- Specified by:
- removein interface- Subscription
- Overrides:
- removein class- PrefetchSubscription
- Returns:
- a list of un-acked messages that were added to the subscription.
- Throws:
- Exception
 
 - 
atMaxpublic boolean atMax() 
 - 
setMaxMessagespublic void setMaxMessages(long max) 
 
- 
 
-