|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.exolab.jms.messagemgr.ConsumerEndpoint
org.exolab.jms.messagemgr.TopicConsumerEndpoint
public class 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 ConsumerEndpointtrue if the endpoint should be rescheduledpublic MessageHandle receiveMessage(long wait)
ConsumerEndpoint
receiveMessage in class ConsumerEndpointwait - - the number of milliseconds to wait
public MessageHandle receiveNoWait()
public boolean messageRemoved(MessageImpl message)
DestinationCacheEventListener
messageRemoved in interface DestinationCacheEventListenermessageRemoved in class ConsumerEndpointmessage - - message removed from cache
public boolean persistentMessageRemoved(java.sql.Connection connection,
MessageImpl message)
throws PersistenceException
DestinationCacheEventListener
persistentMessageRemoved in interface DestinationCacheEventListenerpersistentMessageRemoved in class ConsumerEndpointconnection - - the database connectionmessage - - message to remove from cache
PersistenceException - - if there is a persistence related problempublic JmsDestination getDestination()
ConsumerEndpoint
getDestination in class ConsumerEndpointpublic void unregister()
ConsumerEndpoint
unregister in class ConsumerEndpointpublic void recover()
ConsumerEndpoint
recover in class ConsumerEndpoint
public void destinationAdded(JmsDestination destination,
DestinationCache cache)
DestinationEventListenerDestinationManager
destinationAdded in interface DestinationEventListenerdestination - - destination that was addedcache - - the corresponding cache
public void destinationRemoved(JmsDestination destination,
DestinationCache cache)
DestinationEventListenerDestinationManager
destinationRemoved in interface DestinationEventListenerdestination - - destination that was removedcache - - the corresponding cacheprotected void doClose()
doClose in class ConsumerEndpoint
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||