KickJava   Java API By Example, From Geeks To Geeks.

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


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

24 package org.objectweb.joram.mom.notifications;
25
26 import org.objectweb.joram.mom.notifications.ClientMessages;
27 import java.util.Hashtable JavaDoc;
28 import java.util.Vector JavaDoc;
29
30 public class LBCycleLife extends QueueClusterNot {
31
32   private ClientMessages clientMessages;
33   private Hashtable JavaDoc visitTable;
34
35   /**
36    *
37    * @param rateOfFlow
38    */

39   public LBCycleLife(float rateOfFlow) {
40     super(rateOfFlow);
41     visitTable = new Hashtable JavaDoc();
42   }
43   
44   /**
45    *
46    * @param clientMessages
47    */

48   public void setClientMessages(ClientMessages clientMessages) {
49     this.clientMessages = clientMessages;
50   }
51
52   /**
53    *
54    * @return ClientMessages
55    */

56   public ClientMessages getClientMessages() {
57     return clientMessages;
58   }
59
60   /**
61    *
62    * @param msgId
63    * @param visit
64    */

65   public void putInVisitTable(String JavaDoc msgId,
66                               Vector JavaDoc visit) {
67     visitTable.put(msgId,visit);
68   }
69
70   /**
71    *
72    * @return visitTable
73    */

74   public Hashtable JavaDoc getVisitTable() {
75     return visitTable;
76   }
77
78   /**
79    * Appends a string image for this object to the StringBuffer parameter.
80    *
81    * @param output
82    * buffer to fill in
83    * @return <code>output</code> buffer is returned
84    */

85   public StringBuffer JavaDoc toString(StringBuffer JavaDoc output) {
86     output.append('(');
87     super.toString(output);
88     output.append(", clientMessages=").append(clientMessages);
89     output.append(", visitTable=").append(visitTable);
90     output.append(')');
91
92     return output;
93   }
94 }
95
Popular Tags