KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > mr > SingletonRepository


1 /*
2  * Copyright 2002 by
3  * <a HREF="http://www.coridan.com">Coridan</a>
4  * <a HREF="mailto: support@coridan.com ">support@coridan.com</a>
5  *
6  * The contents of this file are subject to the Mozilla Public License Version
7  * 1.1 (the "License"); you may not use this file except in compliance with the
8  * License. You may obtain a copy of the License at
9  * http://www.mozilla.org/MPL/
10  *
11  * Software distributed under the License is distributed on an "AS IS" basis,
12  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13  * for the specific language governing rights and limitations under the
14  * License.
15  *
16  * The Original Code is "MantaRay" (TM).
17  *
18  * The Initial Developer of the Original Code is Amir Shevat , Yuval Lubowich.
19  * Portions created by the Initial Developer are Copyright (C) 2006
20  * Coridan Inc. All Rights Reserved.
21  *
22  * Contributor(s): all the names of the contributors are added in the source
23  * code where applicable.
24  *
25  * Alternatively, the contents of this file may be used under the terms of the
26  * LGPL license (the "GNU LESSER GENERAL PUBLIC LICENSE"), in which case the
27  * provisions of LGPL are applicable instead of those above. If you wish to
28  * allow use of your version of this file only under the terms of the LGPL
29  * License and not to allow others to use your version of this file under
30  * the MPL, indicate your decision by deleting the provisions above and
31  * replace them with the notice and other provisions required by the LGPL.
32  * If you do not delete the provisions above, a recipient may use your version
33  * of this file under either the MPL or the GNU LESSER GENERAL PUBLIC LICENSE.
34  
35  *
36  * This library is free software; you can redistribute it and/or modify it
37  * under the terms of the MPL as stated above or under the terms of the GNU
38  * Lesser General Public License as published by the Free Software Foundation;
39  * either version 2.1 of the License, or any later version.
40  *
41  * This library is distributed in the hope that it will be useful, but WITHOUT
42  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
43  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
44  * License for more details.
45  */

46 package org.mr;
47
48 import org.mr.core.cmc.MantaJMXManagement;
49 import org.mr.core.configuration.ConfigManager;
50 import org.mr.core.groups.MutlicastGroupManager;
51 import org.mr.core.net.NetworkManager;
52 import org.mr.core.stats.StatManager;
53 import org.mr.indexing.WBManager;
54 import org.mr.kernel.DelayedMessageSender;
55 import org.mr.kernel.IncomingClientMessageRouter;
56 import org.mr.kernel.IncomingMessageManager;
57 import org.mr.kernel.PluginManager;
58 import org.mr.kernel.security.MantaAuthentication;
59 import org.mr.kernel.security.MantaAuthorization;
60 import org.mr.kernel.control.ControlSignalMessageConsumer;
61 import org.mr.kernel.delivery.DeliveryAckNotifier;
62 import org.mr.kernel.delivery.PostOffice;
63 import org.mr.kernel.services.SelectorsManager;
64 import org.mr.kernel.services.ServiceActorControlCenter;
65 import org.mr.kernel.services.queues.QueueServiceFactory;
66 import org.mr.kernel.services.queues.VirtualQueuesManager;
67 import org.mr.kernel.services.topics.VirtualTopicManager;
68 import org.mr.kernel.world.WorldModeler;
69
70
71 /**
72  * This class holds all the "Singleton" in the systems, these are not realy Singleton but we keep then only once here
73  *
74  * @version 1.0
75  * @since Jan 14, 2004
76  * @author Amir Shevat , Yuval Lubowich
77  *
78  */

79 public class SingletonRepository {
80
81
82     private ConfigManager configManager = null;
83     private VirtualQueuesManager virtualQueuesManager = null;
84     private VirtualTopicManager virtualTopicManager = null;
85     private WorldModeler worldModeler = null;
86     private ControlSignalMessageConsumer controlSignalMessageConsumer = null;
87     private IncomingMessageManager incomingMessageManager = null;
88     private IncomingClientMessageRouter incomingClientMessageRouter = null;
89     private SelectorsManager selectorsManager = null;
90     private SecurityManager JavaDoc securityManager = null;
91     private MutlicastGroupManager groupsManager = null;
92     private ServiceActorControlCenter serviceActorControlCenter = null;
93     private WBManager wbManager = null;
94     private PluginManager pluginManager = null;
95     private PostOffice postOffice = null;
96     private MantaJMXManagement mantaJMXManagement = null;
97     private DeliveryAckNotifier deliveryAckNotifier = null;
98     private MessageManipulator messageManipulator= null;
99     private StatManager statManager;
100     private NetworkManager networkManager;
101     private DelayedMessageSender delayedMessageSender;
102     private QueueServiceFactory queueServiceFactory;
103     private MantaAuthentication authentication;
104     private MantaAuthorization authorization;
105
106     /**
107      * @return Returns the configManager.
108      */

109     public ConfigManager getConfigManager() {
110         return configManager;
111     }
112
113     /**
114      * @param configManager
115      * The configManager to set.
116      */

117     public void setConfigManager(ConfigManager configManager) {
118         this.configManager = configManager;
119     }
120
121
122
123     /**
124      * @return Returns the virtualQueuesManager.
125      */

126     public VirtualQueuesManager getVirtualQueuesManager() {
127         return virtualQueuesManager;
128     }
129
130     /**
131      * @param virtualQueuesManager
132      * The virtualQueuesManager to set.
133      */

134     public void setVirtualQueuesManager(VirtualQueuesManager virtualQueuesManager) {
135         this.virtualQueuesManager = virtualQueuesManager;
136     }
137
138     /**
139      * @return Returns the worldModeler.
140      */

141     public WorldModeler getWorldModeler() {
142         return worldModeler;
143     }
144
145     /**
146      * @param worldModeler
147      * The worldModeler to set.
148      */

149     public void setWorldModeler(WorldModeler worldModeler) {
150         this.worldModeler = worldModeler;
151     }
152
153     /**
154      * @return Returns the controlSignalMessageConsumer.
155      */

156     public ControlSignalMessageConsumer getControlSignalMessageConsumer() {
157         return controlSignalMessageConsumer;
158     }
159
160     /**
161      * @param controlSignalMessageConsumer
162      * The controlSignalMessageConsumer to set.
163      */

164     public void setControlSignalMessageConsumer(ControlSignalMessageConsumer controlSignalMessageConsumer) {
165         this.controlSignalMessageConsumer = controlSignalMessageConsumer;
166     }
167
168     /**
169      * @return Returns the incomingMessageManager.
170      */

171     public IncomingMessageManager getIncomingMessageManager() {
172         return incomingMessageManager;
173     }
174
175     /**
176      * @param IncomingClientMessageRouter
177      * The IncomingClientMessageRouter to set.
178      */

179     public void setIncomingMessageManager(IncomingMessageManager incomingMessageManager) {
180         this.incomingMessageManager = incomingMessageManager;
181     }
182
183     /**
184      * @return Returns the virtualTopicManager.
185      */

186     public VirtualTopicManager getVirtualTopicManager() {
187         return virtualTopicManager;
188     }
189
190     /**
191      * @param virtualTopicManager
192      * The virtualTopicManager to set.
193      */

194     public void setVirtualTopicManager(VirtualTopicManager virtualTopicManager) {
195         this.virtualTopicManager = virtualTopicManager;
196     }
197
198     /**
199      * @return Returns the selectorsManager.
200      */

201     public SelectorsManager getSelectorsManager() {
202         return selectorsManager;
203     }
204
205     /**
206      * @param selectorsManager
207      * The selectorsManager to set.
208      */

209     public void setSelectorsManager(SelectorsManager selectorsManager) {
210         this.selectorsManager = selectorsManager;
211     }
212
213
214     /**
215      * @return Returns the securityManager.
216      */

217     public SecurityManager JavaDoc getSecurityManager() {
218         return securityManager;
219     }//getSecurityManager
220

221     /**
222      * @param securityManager
223      * The securityManager to set.
224      */

225     public void setSecurityManager(SecurityManager JavaDoc securityManager) {
226         this.securityManager = securityManager;
227     }//setSecurityManager
228

229     /**
230      * @return Returns the groupsManager.
231      */

232     public MutlicastGroupManager getGroupsManager() {
233         return groupsManager;
234     }
235
236     /**
237      * @param groupsManager
238      * The groupsManager to set.
239      */

240     public void setGroupsManager(MutlicastGroupManager groupsManager) {
241         this.groupsManager = groupsManager;
242     }
243
244 // /**
245
// * @return Returns the controlSignalMessageSender.
246
// */
247
// public ControlSignalMessageSender getControlSignalMessageSender() {
248
// return controlSignalMessageSender;
249
// }
250

251 // /**
252
// * @param controlSignalMessageSender
253
// * The controlSignalMessageSender to set.
254
// */
255
// public void setControlSignalMessageSender(ControlSignalMessageSender controlSignalMessageSender) {
256
// this.controlSignalMessageSender = controlSignalMessageSender;
257
// }
258

259     /**
260      * @return Returns the serviceActorControlCenter.
261      */

262     public ServiceActorControlCenter getServiceActorControlCenter() {
263         return serviceActorControlCenter;
264     }
265
266     /**
267      * @param serviceActorControlCenter
268      * The serviceActorControlCenter to set.
269      */

270     public void setServiceActorControlCenter(ServiceActorControlCenter serviceActorControlCenter) {
271         this.serviceActorControlCenter = serviceActorControlCenter;
272     }
273
274     /**
275      * @return Returns the irsManager.
276      */

277     public WBManager getWBManager() {
278         return wbManager;
279     }
280
281     /**
282      * @param serviceActorControlCenter
283      * The serviceActorControlCenter to set.
284      */

285     public void setWBManager(WBManager wbManager) {
286         this.wbManager = wbManager;
287     }
288
289     /**
290      * @return Returns the pluginManager.
291      */

292     public PluginManager getPluginManager() {
293         return pluginManager;
294     }
295     /**
296      * @param pluginManager The pluginManager to set.
297      */

298     public void setPluginManager(PluginManager pluginManager) {
299         this.pluginManager = pluginManager;
300     }
301     /**
302      * @return Returns the postOffice.
303      */

304     public PostOffice getPostOffice() {
305         return postOffice;
306     }
307     /**
308      * @param postOffice The postOffice to set.
309      */

310     public void setPostOffice(PostOffice postOffice) {
311         this.postOffice = postOffice;
312     }
313
314     /**
315      * @param manager the MantaJMXManagement to set
316      */

317     //the next method was added by lital kasif
318
public void setMantaJMXManagement(MantaJMXManagement manager){
319         this.mantaJMXManagement = manager;
320
321     }
322
323     /**
324      * @return Returns the mantaJMXManagmen.
325      */

326     // the next method was added by lital kasif
327

328     public MantaJMXManagement getMantaJMXManagment(){
329         return this.mantaJMXManagement;
330
331     }
332     /**
333      * @return Returns the incomingClientMessageRouter.
334      */

335     public IncomingClientMessageRouter getIncomingClientMessageRouter() {
336         return incomingClientMessageRouter;
337     }
338     /**
339      * @param incomingClientMessageRouter The incomingClientMessageRouter to set.
340      */

341     public void setIncomingClientMessageRouter(
342             IncomingClientMessageRouter incomingClientMessageRouter) {
343         this.incomingClientMessageRouter = incomingClientMessageRouter;
344     }
345     public DeliveryAckNotifier getDeliveryAckNotifier() {
346         return deliveryAckNotifier;
347     }
348     public void setDeliveryAckNotifier(DeliveryAckNotifier deliveryAckNotifier) {
349         this.deliveryAckNotifier = deliveryAckNotifier;
350     }
351     public MessageManipulator getMessageManipulator() {
352         return messageManipulator;
353     }
354     public void setMessageManipulator(MessageManipulator messageManipulator) {
355         this.messageManipulator = messageManipulator;
356     }
357
358     public void setStatManager(StatManager manager) {
359         this.statManager =manager;
360
361     }
362     public StatManager getStatManager() {
363         return statManager;
364     }
365
366     public void setNetworkManager(NetworkManager manager) {
367         this.networkManager = manager;
368
369     }
370     public NetworkManager getNetworkManager() {
371         return networkManager;
372     }
373     public DelayedMessageSender getDelayedMessageSender() {
374         return delayedMessageSender;
375     }
376     public void setDelayedMessageSender(
377             DelayedMessageSender delayedMessageSender) {
378         this.delayedMessageSender = delayedMessageSender;
379     }
380
381     public void setQueueServiceFactory(QueueServiceFactory queueServiceFactory) {
382         this.queueServiceFactory = queueServiceFactory;
383
384     }
385     public QueueServiceFactory getQueueServiceFactory() {
386         return queueServiceFactory;
387     }
388
389     public void setMantaAuthentication(MantaAuthentication authentication) {
390         this.authentication = authentication;
391     }
392     public MantaAuthentication getMantaAuthentication() {
393         return authentication;
394     }
395
396     public void setMantaAuthorization(MantaAuthorization authorization) {
397         this.authorization = authorization;
398     }
399     public MantaAuthorization getMantaAuthorization() {
400         return authorization;
401     }
402 }
Popular Tags