Package org.springframework.jmx.support
Class ObjectNameManager
- java.lang.Object
- org.springframework.jmx.support.ObjectNameManager
public class ObjectNameManager extends Object
Helper class for the creation ofObjectNameinstances.- Since:
- 1.2
- Author:
- Rob Harrop, Juergen Hoeller
- See Also:
ObjectName.getInstance(String)
Constructor Summary
Constructors Constructor Description ObjectNameManager()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ObjectNamegetInstance(Object objectName)Retrieve theObjectNameinstance corresponding to the supplied name.static ObjectNamegetInstance(String objectName)Retrieve theObjectNameinstance corresponding to the supplied name.static ObjectNamegetInstance(String domainName, String key, String value)Retrieve anObjectNameinstance for the specified domain and a single property with the supplied key and value.static ObjectNamegetInstance(String domainName, Hashtable<String,String> properties)Retrieve anObjectNameinstance with the specified domain name and the supplied key/name properties.
Constructor Detail
ObjectNameManager
public ObjectNameManager()
Method Detail
getInstance
public static ObjectName getInstance(Object objectName) throws MalformedObjectNameException
Retrieve theObjectNameinstance corresponding to the supplied name.- Parameters:
objectName- theObjectNameinObjectNameorStringformat- Returns:
- the
ObjectNameinstance - Throws:
MalformedObjectNameException- in case of an invalid object name specification- See Also:
ObjectName(String),ObjectName.getInstance(String)
getInstance
public static ObjectName getInstance(String objectName) throws MalformedObjectNameException
Retrieve theObjectNameinstance corresponding to the supplied name.- Parameters:
objectName- theObjectNameinStringformat- Returns:
- the
ObjectNameinstance - Throws:
MalformedObjectNameException- in case of an invalid object name specification- See Also:
ObjectName(String),ObjectName.getInstance(String)
getInstance
public static ObjectName getInstance(String domainName, String key, String value) throws MalformedObjectNameException
Retrieve anObjectNameinstance for the specified domain and a single property with the supplied key and value.- Parameters:
domainName- the domain name for theObjectNamekey- the key for the single property in theObjectNamevalue- the value for the single property in theObjectName- Returns:
- the
ObjectNameinstance - Throws:
MalformedObjectNameException- in case of an invalid object name specification- See Also:
ObjectName(String, String, String),ObjectName.getInstance(String, String, String)
getInstance
public static ObjectName getInstance(String domainName, Hashtable<String,String> properties) throws MalformedObjectNameException
Retrieve anObjectNameinstance with the specified domain name and the supplied key/name properties.- Parameters:
domainName- the domain name for theObjectNameproperties- the properties for theObjectName- Returns:
- the
ObjectNameinstance - Throws:
MalformedObjectNameException- in case of an invalid object name specification- See Also:
ObjectName(String, java.util.Hashtable),ObjectName.getInstance(String, java.util.Hashtable)