|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.exolab.jms.messagemgr.AbstractConsumerEndpoint
|
+--org.exolab.jms.messagemgr.QueueConsumerEndpoint
A ConsumerEndpoint for queues. This object shares access to a
particular queue with other QueueConsumerEndpoint instances.
| Constructor Summary | |
QueueConsumerEndpoint(long consumerId,
QueueDestinationCache cache,
java.lang.String selector)
Construct a new QueueConsumerEndpoint. |
|
| Method Summary | |
protected void |
doClose()
Closes this endpoint. |
protected MessageHandle |
doReceive(Condition cancel)
Return the next available message to the client. |
int |
getMessageCount()
Return the number of unsent messages. |
boolean |
messageAdded(MessageHandle handle,
MessageImpl message)
This event is called when a non-persistent message is added to a DestinationCache. |
void |
messageRemoved(java.lang.String messageId)
This event is called when a message is removed from the DestinationCache. |
boolean |
persistentMessageAdded(MessageHandle handle,
MessageImpl message)
This event is called when a persistent message is added to the DestinationCache. |
void |
persistentMessageRemoved(java.lang.String messageId)
This event is called when a message is removed from the DestinationCache |
| Methods inherited from class org.exolab.jms.messagemgr.AbstractConsumerEndpoint |
canConsume, close, getDestination, getId, getNoLocal, getPersistentId, getSelector, isAsynchronous, isClosed, isPersistent, isWaitingForMessage, notifyMessageAvailable, receive, selects, setAsynchronous, setListener, setNoLocal, setSelector, setWaitingForMessage, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public QueueConsumerEndpoint(long consumerId,
QueueDestinationCache cache,
java.lang.String selector)
throws javax.jms.InvalidSelectorException,
javax.jms.JMSException
QueueConsumerEndpoint.consumerId - the identity of this consumercache - the cache to register withjavax.jms.InvalidSelectorException - if the selector is not well formedjavax.jms.JMSException - if the destination cache can't be
created| Method Detail |
public int getMessageCount()
public boolean messageAdded(MessageHandle handle,
MessageImpl message)
DestinationCache.handle - a handle to the added messagemessage - the added messagetrue if the listener accepted the message; otherwise
false
public boolean persistentMessageAdded(MessageHandle handle,
MessageImpl message)
DestinationCache.handle - a handle to the added messagemessage - the added messagetruepublic void messageRemoved(java.lang.String messageId)
DestinationCache.messageId - the identifier of the removed messagepublic void persistentMessageRemoved(java.lang.String messageId)
DestinationCachemessageId - a handle to the removed message
protected MessageHandle doReceive(Condition cancel)
throws javax.jms.JMSException
doReceive in class AbstractConsumerEndpointcancel - null if none is availablejavax.jms.JMSException - for any errorprotected void doClose()
doClose in class AbstractConsumerEndpoint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||