Package org.glassfish.gmbal
Annotation Type AMXMetadata
-
@Documented @Target(TYPE) @Retention(RUNTIME) @Inherited public @interface AMXMetadata
Annotation to contol exactly how the type value in the ObjectName is extracted from a class when registering an instance of that class. The absence of this annotation is the same as the default values. Note that this is simply an application of the general @DescriptorKey mechanism, but these particular metadata attributes control some of the behavior of the AMXMBeanInterface API.Note that supportsAdoption is not included here, because that attribute is always false for gmbal.
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String
genericInterfaceName
Return the generic AMXMBeanInterface interface to be used.java.lang.String
group
String denoting classification of MBean.boolean
immutableInfo
True if the MBeanInfo is invariant, that is, has the same value for the lifetime of the MBean.java.lang.String
interfaceClassName
Defines the name of the interface to use when generating a proxy for this class.boolean
isSingleton
True if only one MBean of this type may be created inside the same parent containerjava.lang.String[]
subTypes
Return the list of types that are legal as types of children of this type.java.lang.String
type
An explicit type to use for the MBean.
-
-
-
Element Detail
-
isSingleton
@DescriptorKey("amx.isSingleton") boolean isSingleton
True if only one MBean of this type may be created inside the same parent container- Returns:
- whether or not this MBean must be the only one of its type.
- Default:
- false
-
-
-
group
@DescriptorKey("amx.group") java.lang.String group
String denoting classification of MBean. Predefined values are configuration, monitoring, jsr77, utility, and other.- Returns:
- The group type.
- Default:
- "other"
-
-
-
subTypes
@DescriptorKey("amx.subTypes") java.lang.String[] subTypes
Return the list of types that are legal as types of children of this type. If unknown, must be an empty array.- Returns:
- Array of child types
- Default:
- {}
-
-
-
genericInterfaceName
@DescriptorKey("amx.genericInterfaceName") java.lang.String genericInterfaceName
Return the generic AMXMBeanInterface interface to be used.- Returns:
- name of interface to use.
- Default:
- "org.glassfish.admin.amx.core.AMXProxy"
-
-
-
immutableInfo
@DescriptorKey("immutableInfo") boolean immutableInfo
True if the MBeanInfo is invariant, that is, has the same value for the lifetime of the MBean. This may be used as a hint to clients that the MBeanInfo can be cached.- Returns:
- True if the MBeanInfo is invariant
- Default:
- true
-
-
-
interfaceClassName
@DescriptorKey("interfaceName") java.lang.String interfaceClassName
Defines the name of the interface to use when generating a proxy for this class. Defaults to a generic interface.- Returns:
- The interface class name for a proxy.
- Default:
- ""
-
-
-
type
@DescriptorKey("type") java.lang.String type
An explicit type to use for the MBean.Note that this is NOT part of the AMXMBeanInterface-defined metadata, but gmbal needs it here to have a place to override the type.
Gmbal determines the type name as follows:
- If the class has a final static field of type String with the name "AMX_TYPE", the value of the field is the type name.
- Otherwise, if the class has an @AMXMetadata annotations, and the value of the type is not "", the value of the type is the type name.
- Otherwise, if the package prefix of the class name matches one of the type prefixes added by an stripPrefix call to the ManagedObjectManager, the type name is the full class name with the matching prefix removed.
- Otherwise, if the stripPackagePrefix method was called on the ManagedObjectManager, the type name is the class name without any package prefixes.
- Otherwise, the type name is the class name.
- Returns:
- The type for this MBean.
- Default:
- ""
-
-