org.exolab.jms.messagemgr
Interface DestinationCacheEventListener

All Known Implementing Classes:
ConsumerEndpoint, ConsumerManager, DurableConsumerEndpoint, QueueBrowserEndpoint, QueueConsumerEndpoint, TopicConsumerEndpoint

public interface DestinationCacheEventListener

A DestinationCacheEventListener responds to events generated by a DestinationCache. It gets notified when a message is added or removed for a particular destination.

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

Method Summary
 boolean messageAdded(MessageImpl message)
          This event is called when a non-persistent message is added to the DestinationCache.
 boolean messageRemoved(MessageImpl message)
          This event is called when a message is removed from the DestinationCache.
 boolean persistentMessageAdded(java.sql.Connection connection, MessageImpl message)
          This event is called when a persistent message is added to the DestinationCache.
 boolean persistentMessageRemoved(java.sql.Connection connection, MessageImpl message)
          This event is called when a message is removed from the DestinationCache.
 

Method Detail

messageAdded

boolean messageAdded(MessageImpl message)
This event is called when a non-persistent message is added to the DestinationCache.

Parameters:
message - - message added to cache

messageRemoved

boolean messageRemoved(MessageImpl message)
This event is called when a message is removed from the DestinationCache.

Parameters:
message - - message removed from cache

persistentMessageAdded

boolean persistentMessageAdded(java.sql.Connection connection,
                               MessageImpl message)
                               throws PersistenceException
This event is called when a persistent message is added to the DestinationCache.

Parameters:
connection - - the database connection
message - - message added to cache
Throws:
PersistenceException - - if there is a persistence related problem

persistentMessageRemoved

boolean persistentMessageRemoved(java.sql.Connection connection,
                                 MessageImpl message)
                                 throws PersistenceException
This event is called when a message is removed from the DestinationCache.

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


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