KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > joram > mom > notifications > RegisteredDestNot


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2005 - 2006 ScalAgent Distributed Technologies
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18  * USA.
19  *
20  * Initial developer(s): ScalAgent Distributed Technologies
21  * Contributor(s):
22  */

23 package org.objectweb.joram.mom.notifications;
24
25 import fr.dyade.aaa.agent.AgentId;
26
27 public class RegisteredDestNot
28     extends fr.dyade.aaa.agent.Notification {
29
30   private AgentId reply;
31   private String JavaDoc name;
32   private AgentId dest = null;
33   
34   public RegisteredDestNot(String JavaDoc name,
35                            AgentId reply) {
36     this.name = name;
37     this.reply = reply;
38   }
39   
40   public final void setDestination(AgentId dest) {
41     this.dest = dest;
42   }
43
44   public final AgentId getDestination() {
45     return dest;
46   }
47   
48   public final String JavaDoc getName() {
49     return name;
50   }
51
52   public final AgentId getReply() {
53     return reply;
54   }
55   
56   /**
57    * Appends a string image for this object to the StringBuffer parameter.
58    *
59    * @param output
60    * buffer to fill in
61    * @return
62     <code>output</code> buffer is returned
63    */

64   public StringBuffer JavaDoc toString(StringBuffer JavaDoc output) {
65     output.append('(');
66     super.toString(output);
67     output.append(",name=").append(name);
68     output.append(",dest=").append(dest);
69     output.append(",reply=").append(reply);
70     output.append(')');
71
72     return output;
73   }
74 }
75
Popular Tags