org.norther.tammi.core.rt
Class StaticVariableRegistry

java.lang.Object
  extended by org.norther.tammi.core.rt.StaticVariableRegistry

public abstract class StaticVariableRegistry
extends Object

A convenience class to statically access type specific variable registries.

Author:
Ilkka Priha

Constructor Summary
StaticVariableRegistry()
           
 
Method Summary
static MBeanReference getVariableRegistryMBean(String type)
          Gets a reference to the variable registry MBean of the specified variable type.
static MBeanReference putRegisteredType(String type, MBeanReference ref)
          Puts a registered variable type.
static boolean removeRegisteredType(String type, MBeanReference ref)
          Removes a registered variable type.
static boolean removeVariableRegistryMBean(MBeanReference ref)
          Removes a reference to the specified variable registry MBean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticVariableRegistry

public StaticVariableRegistry()
Method Detail

getVariableRegistryMBean

public static MBeanReference getVariableRegistryMBean(String type)
Gets a reference to the variable registry MBean of the specified variable type.

Note that the static registry supports only one variable registry for a named variable type.

Parameters:
type - the variable type.
Returns:
a reference to the corresponding variable registry MBean or null.

removeVariableRegistryMBean

public static boolean removeVariableRegistryMBean(MBeanReference ref)
Removes a reference to the specified variable registry MBean.

Parameters:
ref - a reference to the corresponding variable registry MBean.
Returns:
false if already removed, true otherwise.

putRegisteredType

public static MBeanReference putRegisteredType(String type,
                                               MBeanReference ref)
Puts a registered variable type. If the type is already registered, the existing variable registry is not replaced.

Parameters:
type - the variable type.
ref - the corresponding registry.
Returns:
the existing registry, if any.

removeRegisteredType

public static boolean removeRegisteredType(String type,
                                           MBeanReference ref)
Removes a registered variable type.

Parameters:
type - the variable type.
ref - the corresponding registry.
Returns:
false if already removed, true otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.