KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > dyade > aaa > jndi2 > distributed > InitJndiServerNot


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2001 - 2003 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): Sofiane Chibani
21  * Contributor(s): David Feliot, Nicolas Tachker
22  */

23 package fr.dyade.aaa.jndi2.distributed;
24
25 import fr.dyade.aaa.agent.AgentId;
26 import fr.dyade.aaa.agent.Notification;
27 import fr.dyade.aaa.jndi2.impl.NamingContextInfo;
28 import fr.dyade.aaa.util.Strings;
29
30 public class InitJndiServerNot extends Notification {
31   
32   private AgentId[] jndiServerIds;
33
34   private NamingContextInfo[] contexts;
35   
36   /**
37    * Indicates whether this notification is
38    * a request (spontaneously sent)
39    * or a reply to a request.
40    */

41   private boolean isRequest;
42
43   public InitJndiServerNot(AgentId[] jndiServerIds,
44                            NamingContextInfo[] contexts,
45                            boolean isRequest) {
46     this.jndiServerIds = jndiServerIds;
47     this.contexts = contexts;
48     this.isRequest = isRequest;
49   }
50
51   public final AgentId[] getJndiServerIds() {
52     return jndiServerIds;
53   }
54
55   public final NamingContextInfo[] getContexts() {
56     return contexts;
57   }
58   
59   public final boolean isRequest() {
60     return isRequest;
61   }
62
63   /**
64    * Appends a string image for this object to the StringBuffer parameter.
65    *
66    * @param output
67    * buffer to fill in
68    * @return
69     <code>output</code> buffer is returned
70    */

71   public StringBuffer JavaDoc toString(StringBuffer JavaDoc output) {
72     output.append('(');
73     super.toString(output);
74     output.append(",jndiServerIds=");
75     Strings.toString(output, jndiServerIds);
76     output.append(",contexts=");
77     Strings.toString(output, contexts);
78     output.append(",isRequest=" + isRequest);
79     output.append(')');
80     return output;
81   }
82 }
83
Popular Tags