User: mnf999  
  Date: 01/12/18 23:00:50

  Added:       src/main/org/jboss/system Registry.java
  Log:
  A simple registry to bypass the lack of registry publicly browsable in JMX
  
  Revision  Changes    Path
  1.1                  jboss/src/main/org/jboss/system/Registry.java
  
  Index: Registry.java
  ===================================================================
  /*
  * JBoss, the OpenSource J2EE webOS
  *
  * Distributable under LGPL license.
  * See terms of license at gnu.org.
  */
  package org.jboss.system;
  
  import java.util.Map;
  import java.util.HashMap;
  import java.util.Collections;
  
  
  /**
  *  A registry, really, a registry.
  *
  *  All methods static to lookup pointers from anyplace in the VM.  We use it for 
hooking up JMX
  *  managed objects.  Use the JMX MBeanName to put objects here.
  *  
  *  @author <a href="mailto:[EMAIL PROTECTED]>Marc Fleury</a>
  *
  *  @version $Revision: 1.1 $
  */
  public class Registry
  {
  
     public static Map entries = Collections.synchronizedMap(new HashMap());
     
     public static void bind(Object key, Object value) { entries.put(key,value);}
     
     public static Object unbind(Object key) { return entries.remove(key); }
     
     public static Object lookup(Object key) { return entries.get(key); }
  }
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to