com.j256.simplejmx.common
Class ObjectNameUtil

java.lang.Object
  extended by com.j256.simplejmx.common.ObjectNameUtil

public class ObjectNameUtil
extends Object

Utility class that creates ObjectName objects from various arguments.

Author:
graywatson

Method Summary
static ObjectName makeObjectName(JmxResource jmxResource, JmxSelfNaming selfNamingObj)
          Constructs an object-name from a jmx-resource and a self naming object.
static ObjectName makeObjectName(JmxResource jmxResource, Object obj)
          Constructs an object-name from a jmx-resource and a object which is not self-naming.
static ObjectName makeObjectName(JmxSelfNaming selfNamingObj)
          Constructs an object-name from a self naming object only.
static ObjectName makeObjectName(Object obj)
          Constructs an object-name from an object that is detected either having the JmxResource annotation or implementing JmxSelfNaming.
static ObjectName makeObjectName(String domainName, String beanName)
          Constructs an object-name from a domain-name and object-name.
static ObjectName makeObjectName(String domainName, String beanName, String[] folderNameStrings)
          Constructs an object-name from a domain-name, object-name, and folder-name strings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

makeObjectName

public static ObjectName makeObjectName(JmxResource jmxResource,
                                        JmxSelfNaming selfNamingObj)
Constructs an object-name from a jmx-resource and a self naming object.

Parameters:
jmxResource - Annotation from the class for which we are creating our ObjectName. It may be null.
selfNamingObj - Object that implements the self-naming interface.

makeObjectName

public static ObjectName makeObjectName(JmxSelfNaming selfNamingObj)
Constructs an object-name from a self naming object only.

Parameters:
selfNamingObj - Object that implements the self-naming interface.

makeObjectName

public static ObjectName makeObjectName(JmxResource jmxResource,
                                        Object obj)
Constructs an object-name from a jmx-resource and a object which is not self-naming.

Parameters:
jmxResource - Annotation from the class for which we are creating our ObjectName.
obj - Object for which we are creating our ObjectName

makeObjectName

public static ObjectName makeObjectName(String domainName,
                                        String beanName,
                                        String[] folderNameStrings)
Constructs an object-name from a domain-name, object-name, and folder-name strings.

Parameters:
domainName - This is the top level folder name for the beans.
beanName - This is the bean name in the lowest folder level.
folderNameStrings - These can be used to setup folders inside of the top folder. Each of the entries in the array can either be in "value" or "name=value" format.

makeObjectName

public static ObjectName makeObjectName(String domainName,
                                        String beanName)
Constructs an object-name from a domain-name and object-name.

Parameters:
domainName - This corresponds to the JmxResource.domainName() and is the top level folder name for the beans.
beanName - This corresponds to the JmxResource.beanName() and is the bean name in the lowest folder level.

makeObjectName

public static ObjectName makeObjectName(Object obj)
Constructs an object-name from an object that is detected either having the JmxResource annotation or implementing JmxSelfNaming.

Parameters:
obj - Object for which we are creating our ObjectName


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