KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > monitoring > MonitoringManagerFactoryImpl


1 /*
2  * @(#)MonitoringManagerFactoryImpl.java 1.3 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.monitoring;
9
10 import java.util.HashMap JavaDoc;
11 import com.sun.corba.se.spi.monitoring.MonitoringManagerFactory;
12 import com.sun.corba.se.spi.monitoring.MonitoringManager;
13
14 public class MonitoringManagerFactoryImpl implements MonitoringManagerFactory {
15
16     private HashMap JavaDoc monitoringManagerTable = new HashMap JavaDoc();
17
18     public synchronized MonitoringManager createMonitoringManager(
19         String JavaDoc nameOfTheRoot, String JavaDoc description )
20     {
21     MonitoringManagerImpl m = null;
22     m = (MonitoringManagerImpl)monitoringManagerTable.get(nameOfTheRoot);
23     if (m == null) {
24         m = new MonitoringManagerImpl( nameOfTheRoot, description );
25         monitoringManagerTable.put(nameOfTheRoot, m);
26     }
27         return m;
28     }
29 }
30
31
Popular Tags