FileDocCategorySizeDatePackage
CustomMBeanConstants.javaAPI DocGlassfish v2 API5490Fri May 04 22:24:10 BST 2007com.sun.enterprise.admin.mbeans.custom

CustomMBeanConstants

public class CustomMBeanConstants extends Object
Class that holds the constant fields used by custom MBean deployment/registration code.

Fields Summary
public static final String
NAME_KEY
Represents the key for the name of a custom MBean.
public static final String
OBJECT_NAME_KEY
Represents the key for the object-name of a custom MBean.
public static final String
IMPL_CLASS_NAME_KEY
Represents the key for the class-name of a custom MBean.
public static final String
OBJECT_TYPE_KEY
Represents the key for the object-type of the custom MBean.
public static final String
SERVER_KEY
Represents the key for server where the custom MBean is created.
public static final String
ENABLED_KEY
Represents the key for enabled flag on the custom MBean.
public static final int
USER_DEFINED
Represents the user-defined MBean.
public static final int
SYSTEM_ALL
Represents a "system-all" MBean.
public static final int
SYSTEM_ADMIN
Represents a "system-admin" MBean.
public static final String
CMB_LOCAL
LocalStrings in this package
public static final String
CMB_LOADING_LOCAL
LocalStrings in loading package
public static final String
CMB_EE_LOCAL
LocalStrings in ee package
public static final String
CMB_LOG
LogStrings
public static final String
CUSTOM_MBEAN_DOMAIN
private static final Set
iSet
public static final Set
MBEAN_TYPES
Constructors Summary
private CustomMBeanConstants()

    
Methods Summary
public static final java.util.MapunmodifiableMap(java.lang.String key, java.lang.String value)
Returns an unmodifiable Map that contains the given valid mapping for this class. Note that the valid keys are defined as the fields of this class.

see
#OBJECT_NAME_KEY
see
#NAME_KEY
see
#IMPL_CLASS_NAME_KEY

    
    
                                         
                 
        final boolean vk = OBJECT_NAME_KEY.equals(key) || IMPL_CLASS_NAME_KEY.equals(key) || NAME_KEY.equals(key);
        if (!vk)
            throw new IllegalArgumentException(CMBStrings.get("InternalError", "invalid arg")); //TODO
        if (value == null)
            throw new IllegalArgumentException(CMBStrings.get("InternalError", "can't be null value")); //TODO
        final Map<String, String> m = new HashMap<String, String> ();
        m.put(key, value);
        return ( Collections.unmodifiableMap(m) );