KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > presumo > jms > message > MessageStateListener


1 /**
2  * This file is part of Presumo.
3  *
4  * Presumo is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * Presumo is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with Presumo; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  *
19  * Copyright 2001 Dan Greff
20  */

21  package com.presumo.jms.message;
22
23
24 /**
25  *
26  * @author Dan Greff
27  */

28 public interface MessageStateListener
29 {
30
31   /**
32    * Callback that indicates the message has been safely
33    * routed to all destinations.
34    * <p>
35    * In Presumo, this means that a MSG_SAFE ack has been
36    * received by every destination the message was sent to thus
37    * indicating that the destinations have the message safely
38    * in persistent storage.
39    * <p>
40    * The RemoteSession, through PersistentAckHelper will implement
41    * this method. When a RemoteSession represents the orgin of
42    * the message, this callback will cause the remote session to
43    * send a MSG_ROUTED ack to the orginator.
44    */

45   public void messageRouted(JmsMessage msg);
46     
47   /**
48    * Callback that indicates the message has been removed from
49    * persistent storage.
50    * <p>
51    * In Presumo, this means that the message has received all
52    * MSG_ROUTED acks from destinations the message was sent to
53    * and the MSG_DELETED ack from the orgin. Thus, went into
54    * a state where it could be deleted and did delete itself.
55    * <p>
56    * The RemoteSession, through PersistentAckHelper will implement
57    * this method and when called will queue up a MSG_DELETED
58    * ack to be sent to their destinations whom have already
59    * responded with MSG_ROUTED.
60    */

61   public void messageDeleted(JmsMessage msg);
62
63
64
65 }
66
Popular Tags