org.exolab.jms.messagemgr
Interface MessageManagerEventListener

All Known Implementing Classes:
DestinationCache, DestinationManager, QueueDestinationCache, TopicDestinationCache

public interface MessageManagerEventListener

A MessageManagerEventListener responds to events generated by the MessageMgr.

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

Version:
$Revision: 1.5 $ $Date: 2003/08/17 01:32:24 $
Author:
Jim Alateras

Method Summary
 boolean messageAdded(JmsDestination destination, MessageImpl message)
          This method is called when the MessageMgr adds a message for this destination to the cache
 void messageRemoved(JmsDestination destination, MessageImpl message)
          This method is called when the MessageMgr removes a message from the cache.
 boolean persistentMessageAdded(java.sql.Connection connection, JmsDestination destination, MessageImpl message)
          This event is called when the MessageMgr adds a persistent message to the cache.
 void persistentMessageRemoved(java.sql.Connection connection, JmsDestination destination, MessageImpl message)
          This event is called when the MessageMgr removes a persistent message from the cache.
 

Method Detail

messageAdded

boolean messageAdded(JmsDestination destination,
                     MessageImpl message)
This method is called when the MessageMgr adds a message for this destination to the cache

Parameters:
destination - the message's destination
message - the message added to cache
Returns:
true if this message was accepted

messageRemoved

void messageRemoved(JmsDestination destination,
                    MessageImpl message)
This method is called when the MessageMgr removes a message from the cache.

Parameters:
destination - the message's destination
message - message removed from cache

persistentMessageAdded

boolean persistentMessageAdded(java.sql.Connection connection,
                               JmsDestination destination,
                               MessageImpl message)
                               throws PersistenceException
This event is called when the MessageMgr adds a persistent message to the cache.

Parameters:
connection - the database connection
destination - the message's destination
message - message added to cache
Returns:
trueThrows:
PersistenceException - if there is a persistence related problem

persistentMessageRemoved

void persistentMessageRemoved(java.sql.Connection connection,
                              JmsDestination destination,
                              MessageImpl message)
                              throws PersistenceException
This event is called when the MessageMgr removes a persistent message from the cache.

Parameters:
connection - the database connection
message - message to remove from cache
destination - the message's destination
Throws:
PersistenceException - - if there is a persistence related problem


Copyright © 1999-2005 The OpenJMS Group. All Rights Reserved.