Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Class ActiveMQQueueReceiver  view ActiveMQQueueReceiver download

  extended byorg.activemq.ActiveMQMessageConsumer
      extended byorg.activemq.ActiveMQQueueReceiver
All Implemented Interfaces:
Closeable, javax.jms.MessageConsumer, javax.jms.QueueReceiver,

public class ActiveMQQueueReceiver
extends ActiveMQMessageConsumer
implements javax.jms.QueueReceiver

A client uses a QueueReceiver object to receive messages that have been delivered to a queue.

Although it is possible to have multiple QueueReceiver s for the same queue, the JMS API does not define how messages are distributed between the QueueReceivers.

If a QueueReceiver specifies a message selector, the messages that are not selected remain on the queue. By definition, a message selector allows a QueueReceiver to skip messages. This means that when the skipped messages are eventually read, the total ordering of the reads does not retain the partial order defined by each message producer. Only QueueReceiver s without a message selector will read messages in message producer order.

Creating a MessageConsumer provides the same features as creating a QueueReceiver. A MessageConsumer object is recommended for creating new code. The QueueReceiver is provided to support existing code.

Field Summary
Fields inherited from class org.activemq.ActiveMQMessageConsumer
browser, consumerIdentifier, consumerName, consumerNumber, destination, messageQueue, messageSelector, noLocal, prefetchNumber, session, startTime
Constructor Summary
protected ActiveMQQueueReceiver(ActiveMQSession theSession, org.activemq.message.ActiveMQDestination dest, java.lang.String selector, int cnum, int prefetch)
Method Summary
 javax.jms.Queue getQueue()
          Gets the Queue associated with this queue receiver.
Methods inherited from class org.activemq.ActiveMQMessageConsumer
checkClosed, clearMessagesInProgress, close, getConsumerIdentifier, getConsumerName, getConsumerNumber, getConsumerStats, getDestination, getLocalMemoryUsage, getMessageListener, getMessageSelector, getPrefetchNumber, getStartTime, getStats, isBrowser, isDurableSubscriber, isNoLocal, isTransientSubscriber, processMessage, receive, receive, receiveNoWait, setBrowser, setConsumerName, setConsumerNumber, setMessageListener, setPrefetchNumber, size, start, stop, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.jms.MessageConsumer
close, getMessageListener, getMessageSelector, receive, receive, receiveNoWait, setMessageListener

Constructor Detail


protected ActiveMQQueueReceiver(ActiveMQSession theSession,
                                org.activemq.message.ActiveMQDestination dest,
                                java.lang.String selector,
                                int cnum,
                                int prefetch)
                         throws javax.jms.JMSException
Method Detail


public javax.jms.Queue getQueue()
                         throws javax.jms.JMSException
Gets the Queue associated with this queue receiver.

Specified by:
getQueue in interface javax.jms.QueueReceiver