|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--jrun.jms.core.messagemgr.DestinationCache
|
+--jrun.jms.core.messagemgr.QueueDestinationCache
A DestinationCache for Queues
| Fields inherited from class jrun.jms.core.messagemgr.DestinationCache |
_consumers, _leaseHelper, _messages, m_persistentAdapter |
| Method Summary | |
void |
addQueueListener(QueueListener listener)
A Queue can also hav a queue listener, which simply gets informed of all messages that arrive at this destination |
JmsDestination |
getDestination()
Return a reference to the underlying destination |
MessageHandle |
getMessage(QueueConsumerEndpoint endpoint)
Return the first message of the queue or null if there are no messages in the cache |
int |
getMessageCount()
Return the number of messages currently active for this destination |
int |
hashCode()
|
boolean |
messageAdded(JmsDestination destination,
MessageImpl message)
This method is called when the #MessageManager adds a message
for this destination to the cache |
void |
messageRemoved(JmsDestination destination,
MessageImpl message)
This method is called when the #MessageManager removes a
message from the cache. |
boolean |
persistentMessageAdded(JmsDestination destination,
MessageImpl message)
This event is called when the MessageMgr adds a persistent
message to the cache. |
void |
persistentMessageRemoved(JmsDestination destination,
MessageImpl message)
This method is called when the {@l;ink #MessageManager} removes a persistent message from the cache. |
void |
playbackMessages(QueueListener listener)
Playback all the messages in the cache to the specified QueueListener |
void |
removeQueueListener(QueueListener listener)
Remove the queue listener associated with this cache |
void |
returnMessage(MessageHandle handle,
boolean notifyListeners)
Return the specified message to top of the queue. |
java.lang.String |
toString()
|
| Methods inherited from class jrun.jms.core.messagemgr.DestinationCache |
getConsumers, getDestinationByName, getId, getIdAsString, getLogger, getMaximumSize, onLeaseExpired, onSchedulableEvent, registerConsumer, setCacheEvictionPolicy, setMaximumSize, shutdown, unregisterConsumer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
public JmsDestination getDestination()
DestinationCachegetDestination in class DestinationCachejrun.jms.core.messagemgr.DestinationCachepublic void addQueueListener(QueueListener listener)
listener - - queue listenerpublic void removeQueueListener(QueueListener listener)
listener - - queue listener to remove
public boolean messageAdded(JmsDestination destination,
MessageImpl message)
DestinationCache#MessageManager adds a message
for this destination to the cachemessageAdded in class DestinationCachejrun.jms.core.messagemgr.DestinationCachemessage - - message added to cache
public void messageRemoved(JmsDestination destination,
MessageImpl message)
#MessageManager removes a
message from the cache.messageRemoved in class DestinationCachedestination - - the message destinationmessage - - message removed from cache
public boolean persistentMessageAdded(JmsDestination destination,
MessageImpl message)
throws PersistenceException
MessageManagerEventListenerMessageMgr adds a persistent
message to the cache.jrun.jms.core.messagemgr.MessageManagerEventListenerdestination - - the message's destinationmessage - - message added to cachePersistenceException - - if there is a persistence related problem
public void persistentMessageRemoved(JmsDestination destination,
MessageImpl message)
throws PersistenceException
DestinationCachepersistentMessageRemoved in class DestinationCachejrun.jms.core.messagemgr.DestinationCachemessage - - message removed from cachepublic int getMessageCount()
DestinationCachegetMessageCount in class DestinationCachejrun.jms.core.messagemgr.DestinationCachepublic MessageHandle getMessage(QueueConsumerEndpoint endpoint)
QueueConsumerEndpoint - - the consumer who will receive the messagepublic void playbackMessages(QueueListener listener)
QueueListenerlistener - - the queue listener
public void returnMessage(MessageHandle handle,
boolean notifyListeners)
message - - message to returnpublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||