|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.messagemgr.ConsumerEndpoint | +--org.exolab.jms.messagemgr.TopicConsumerEndpoint
The topic destination cache is specific to a consumer that subscribes to a topic destination.
Field Summary | |
protected java.util.HashMap |
_caches
Maintains a list of TopicDestinationCache that this endpoint subscribes too. |
protected JmsTopic |
_topic
Cache the destination that this endpoint subscribes too |
Fields inherited from class org.exolab.jms.messagemgr.ConsumerEndpoint |
_ackMode, _connectionId, _listener, _nolocal, _scheduler, _selector, _session, _size, _transacted, _waitingForMessage, _waitingForMessageMonitor |
Method Summary | |
boolean |
deliverMessages()
Deliver messages in the cache to the consumer |
void |
destinationAdded(JmsDestination destination,
DestinationCache cache)
This method is called when a new destination is added to the DestinationManager |
void |
destinationRemoved(JmsDestination destination,
DestinationCache cache)
This method is called when a new destination is removed from the DestinationManager |
protected void |
doClose()
Closes this endpoint |
JmsDestination |
getDestination()
Return the destination that this consumer is subscribed to |
boolean |
messageRemoved(MessageImpl message)
This event is called when a message is removed from the DestinationCache. |
boolean |
persistentMessageRemoved(java.sql.Connection connection,
MessageImpl message)
This event is called when a message is removed from the DestinationCache. |
MessageHandle |
receiveMessage(long wait)
Return the next message to the client. |
MessageHandle |
receiveNoWait()
Returns the first available message |
void |
recover()
This message will return all unacked messages to the queue and allow them to be resent to the consumer with the redelivery flag on. |
void |
unregister()
Unregister this consumer for the specified destination cache, so that it will stop receiving messages from it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.HashMap _caches
protected JmsTopic _topic
Method Detail |
public boolean deliverMessages()
deliverMessages
in class ConsumerEndpoint
true
if the endpoint should be rescheduledpublic MessageHandle receiveMessage(long wait)
ConsumerEndpoint
receiveMessage
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
wait
- - the number of milliseconds to waitpublic MessageHandle receiveNoWait()
public boolean messageRemoved(MessageImpl message)
DestinationCacheEventListener
messageRemoved
in class ConsumerEndpoint
org.exolab.jms.messagemgr.DestinationCacheEventListener
message
- - message removed from cachepublic boolean persistentMessageRemoved(java.sql.Connection connection, MessageImpl message) throws PersistenceException
DestinationCacheEventListener
persistentMessageRemoved
in class ConsumerEndpoint
org.exolab.jms.messagemgr.DestinationCacheEventListener
connection
- - the database connectionmessage
- - message to remove from cachePersistenceException
- - if there is a persistence related problempublic JmsDestination getDestination()
ConsumerEndpoint
getDestination
in class ConsumerEndpoint
org.exolab.jms.messagemgr.ConsumerEndpoint
public void unregister()
ConsumerEndpoint
unregister
in class ConsumerEndpoint
public void recover()
ConsumerEndpoint
recover
in class ConsumerEndpoint
public void destinationAdded(JmsDestination destination, DestinationCache cache)
DestinationEventListener
DestinationManager
destinationAdded
in interface DestinationEventListener
org.exolab.jms.messagemgr.DestinationEventListener
destination
- - destination that was addedcache
- - the corresponding cachepublic void destinationRemoved(JmsDestination destination, DestinationCache cache)
DestinationEventListener
DestinationManager
destinationRemoved
in interface DestinationEventListener
org.exolab.jms.messagemgr.DestinationEventListener
destination
- - destination that was removedcache
- - the corresponding cacheprotected void doClose()
doClose
in class ConsumerEndpoint
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |