View Javadoc

1   package org.exolab.jms.messagemgr;
2   
3   import javax.jms.JMSException;
4   
5   import org.exolab.jms.client.JmsDestination;
6   import org.exolab.jms.message.MessageImpl;
7   
8   
9   /***
10   * Enter description here.
11   *
12   * @author <a href="mailto:tma@netspace.net.au">Tim Anderson</a>
13   * @version $Revision: 1.1 $ $Date: 2005/08/30 07:26:49 $
14   */
15  public interface MessageManager {
16  
17      /***
18       * Prepares a message prior to it being passed through the system.
19       *
20       * @param message the message
21       * @throws JMSException if the message is invalid or cannot be prep'ed
22       */
23      void prepare(MessageImpl message) throws JMSException;
24  
25      /***
26       * Add a message.
27       *
28       * @param message the message to add
29       * @throws JMSException if the message cannot be added
30       */
31      void add(MessageImpl message) throws JMSException;
32  
33      /***
34       * Register a listener for a specific destination, to be notified when
35       * messages for the destination arrive.
36       *
37       * @param destination the destination to register the listener for
38       * @param listener    the listener to notify
39       */
40      void addEventListener(JmsDestination destination,
41                            MessageManagerEventListener listener);
42  
43      /***
44       * Remove the listener for the specified destination.
45       *
46       * @param destination the destination to remove the listener for
47       */
48      void removeEventListener(JmsDestination destination);
49  
50  }