public class ObjectNameUtil extends Object
ObjectName
objects from various arguments.Modifier and Type | Method and Description |
---|---|
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 objectNameString)
Constructs an object-name from a string suitable to be passed to the
ObjectName constructor. |
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.
|
public static ObjectName makeObjectName(JmxResource jmxResource, JmxSelfNaming selfNamingObj)
jmxResource
- Annotation from the class for which we are creating our ObjectName. It may be null.selfNamingObj
- Object that implements the self-naming interface.IllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(JmxSelfNaming selfNamingObj)
selfNamingObj
- Object that implements the self-naming interface.IllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(JmxResource jmxResource, Object obj)
jmxResource
- Annotation from the class for which we are creating our ObjectName.obj
- Object for which we are creating our ObjectNameIllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(String domainName, String beanName, String[] folderNameStrings)
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.IllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(String domainName, String beanName)
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.IllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(String objectNameString)
ObjectName
constructor.objectNameString
- The entire object-name string in the form of something like
your.domain:folder=1,name=beanBeanIllegalArgumentException
- If we had problems building the namepublic static ObjectName makeObjectName(Object obj)
JmxResource
annotation or
implementing JmxSelfNaming
.obj
- Object for which we are creating our ObjectNameIllegalArgumentException
- If we had problems building the nameThis documentation content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.