jrun.jms.core.messagemgr
Interface MessageManagerEventListener

All Known Implementing Classes:
DestinationCache, DestinationManager

public interface MessageManagerEventListener

A MessageListener responds to events generated by the MessageManager Currently it gets notified when a message is added or removed for a particular destination.

Additionally, the message listener is scoped so that it only receives messages for a particular #Destination


Method Summary
 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 event is called when a message is removed from the DestinationCache.
 

Method Detail

messageAdded

public boolean messageAdded(JmsDestination destination,
                            MessageImpl message)
This method is called when the #MessageManager adds a message for this destination to the cache
Parameters:
destination - - the message's destination
message - - message added to cache
Returns:
boolean - true if this message was accepted

messageRemoved

public void messageRemoved(JmsDestination destination,
                           MessageImpl message)
This method is called when the #MessageManager removes a message from the cache.
Parameters:
destination - - the message's destination
message - - message removed from cache

persistentMessageAdded

public boolean persistentMessageAdded(JmsDestination destination,
                                      MessageImpl message)
                               throws PersistenceException
This event is called when the MessageMgr adds a persistent message to the cache.
Parameters:
destination - - the message's destination
message - - message added to cache
Returns:
boolean - true if the message was accepted
Throws:
PersistenceException - - if there is a persistence related problem

persistentMessageRemoved

public void persistentMessageRemoved(JmsDestination destination,
                                     MessageImpl message)
                              throws PersistenceException
This event is called when a message is removed from the DestinationCache.
Parameters:
message - - message to remove from cache
destination - - the message's destination
Throws:
PersistenceException - - if there is a persistence related problem


Copyright � 2002 Macromedia Corporation. All Rights Reserved.