com.j256.simplejmx.common
Interface JmxSelfNaming

All Known Implementing Classes:
BaseJmxSelfNaming, JmxResourceInfo

public interface JmxSelfNaming

This allows objects to name themselves based on fields or values internal to the _instance_ of the class. This is often used by objects that have multiple instances and that are dynamically added and removed. Examples of objects that might use self-naming are: database connections, log instances, network config objects. Anytime you have multiple instances of the same object that you want to expose via JMX.

You register these objects using the standard JmxServer.register(Object) methods and then call JmxServer.unregister(Object) if they are removed later. For an example of dynamic self-naming objects, see the JmxIntegrationTest class.

Author:
graywatson

Method Summary
 String getJmxBeanName()
          Return the name of the object that will be the "name=..." part of the associated ObjectName.
 String getJmxDomainName()
          Return the domain name of the object that is used to built the associated ObjectName.
 JmxFolderName[] getJmxFolderNames()
          Return the appropriate array of folder names used to built the associated ObjectName.
 

Method Detail

getJmxDomainName

String getJmxDomainName()
Return the domain name of the object that is used to built the associated ObjectName. Return null to use the one from the JmxResource.domainName() annotation instead.


getJmxBeanName

String getJmxBeanName()
Return the name of the object that will be the "name=..." part of the associated ObjectName. Return null to use the one from the JmxResource.beanName() annotation instead.


getJmxFolderNames

JmxFolderName[] getJmxFolderNames()
Return the appropriate array of folder names used to built the associated ObjectName. Return null to use the folder names specified in the JmxResource.folderNames() annotation instead.



This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.