Annotation Interface JmxResource


@Retention(RUNTIME) @Target(TYPE) public @interface JmxResource
This is used to identify an object which is going to be exported using JMX. Objects that are passed to JmxServer.register(Object) must either have this annotation, must implement JmxSelfNaming, or must be defined programmatically with JmxResourceInfo. This class is similar to Spring's @ManagedResource.
Author:
graywatson
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Name of the JMX bean in the jconsole folder it is in.
    Description of the class for jconsole.
    Domain name of the object which turns into the top-level folder inside of jconsole.
    Optional array of strings which translate into sub-folders below the domain-name that was specified above.
  • Element Details

    • domainName

      String domainName
      Domain name of the object which turns into the top-level folder inside of jconsole.

      If the object implements JmxSelfNaming then this would be replaced by JmxSelfNaming.getJmxDomainName(). If the object doesn't implement JmxSelfNaming and this is not specified then an exception is thrown.

      Default:
      ""
    • beanName

      String beanName
      Name of the JMX bean in the jconsole folder it is in.

      If the object implements JmxSelfNaming then this would be replaced by JmxSelfNaming.getJmxBeanName(). If the object doesn't implement JmxSelfNaming and this is not specified then the object class name is used.

      Default:
      ""
    • folderNames

      String[] folderNames
      Optional array of strings which translate into sub-folders below the domain-name that was specified above. Default is for the object to show up in the domain-name folder. The folder names can either be in name=value format in which case they should be in alphabetic order by name. They can also just be in value format in which case a ## prefix (ex. 00=...) will be added by the code.

      The following are basically synonymous:

      fieldValues = { "Database", "Connections" })
      fieldValues = { "00=Database", "01=Connections" })
      

      If the object implements JmxSelfNaming then this would be replaced by JmxSelfNaming.getJmxFolderNames(). If the object doesn't implement JmxSelfNaming and this is not specified then this bean will be at the top without any sub-folders.

      Default:
      {}
    • description

      String description
      Description of the class for jconsole. Default is something like: "Information about class-name".
      Default:
      ""