Top Description Methods
org.glassfish.gmbal

public @Interface AMXMetadata

extends Annotation
Annotations
@Documented
@Target:TYPE
@Retention:RUNTIME
@Inherited
Imports
java.lang.annotation.Documented, .ElementType, .Inherited, .Retention, .RetentionPolicy, .Target, org.glassfish.external.amx.AMX

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.

Author
ken

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

name of interface to use.
genericInterfaceName
()

Return the generic AMXMBeanInterface interface to be used.

public String

Returns:

The group type.
group
()

String denoting classification of MBean.

public boolean

Returns:

True if the MBeanInfo is invariant
immutableInfo
()

True if the MBeanInfo is invariant, that is, has the same value for the lifetime of the MBean.

public String

Returns:

The interface class name for a proxy.
interfaceClassName
()

Defines the name of the interface to use when generating a proxy for this class.

public boolean

Returns:

whether or not this MBean must be the only one of its type.
isSingleton
()

True if only one MBean of this type may be created inside the same parent container

public String[]

Returns:

Array of child types
subTypes
()

Return the list of types that are legal as types of children of this type.

public String

Returns:

The type for this MBean.
type
()

An explicit type to use for the MBean.

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

genericInterfaceNameback to summary
public String genericInterfaceName()

Return the generic AMXMBeanInterface interface to be used.

Returns:String

name of interface to use.

Annotations
@DescriptorKey:amx.genericInterfaceName
groupback to summary
public String group()

String denoting classification of MBean. Predefined values are configuration, monitoring, jsr77, utility, and other.

Returns:String

The group type.

Annotations
@DescriptorKey:amx.group
immutableInfoback to summary
public 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:boolean

True if the MBeanInfo is invariant

Annotations
@DescriptorKey:immutableInfo
interfaceClassNameback to summary
public String interfaceClassName()

Defines the name of the interface to use when generating a proxy for this class. Defaults to a generic interface.

Returns:String

The interface class name for a proxy.

Annotations
@DescriptorKey:interfaceName
isSingletonback to summary
public boolean isSingleton()

True if only one MBean of this type may be created inside the same parent container

Returns:boolean

whether or not this MBean must be the only one of its type.

Annotations
@DescriptorKey:amx.isSingleton
subTypesback to summary
public 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:String[]

Array of child types

Annotations
@DescriptorKey:amx.subTypes
typeback to summary
public 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:

  1. 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.
  2. 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.
  3. 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.
  4. Otherwise, if the stripPackagePrefix method was called on the ManagedObjectManager, the type name is the class name without any package prefixes.
  5. Otherwise, the type name is the class name.
Returns:String

The type for this MBean.

Annotations
@DescriptorKey:type