Top Description Fields Constructors Methods
org.springframework.jmx.export.naming

public Class IdentityNamingStrategy

extends Object
implements ObjectNamingStrategy
Class Inheritance
All Implemented Interfaces
org.springframework.jmx.export.naming.ObjectNamingStrategy
Imports
java.util.Hashtable, javax.management.MalformedObjectNameException, .ObjectName, org.springframework.jmx.support.ObjectNameManager, org.springframework.lang.Nullable, org.springframework.util.ClassUtils, .ObjectUtils

An implementation of the ObjectNamingStrategy interface that creates a name based on the identity of a given instance.

The resulting ObjectName will be in the form package:class=class name,hashCode=identity hash (in hex)

Authors
Rob Harrop, Juergen Hoeller
Since
1.2

Field Summary

Modifier and TypeField and Description
public static final String
HASH_CODE_KEY

The hash code key.

public static final String
TYPE_KEY

The type key.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ObjectName
getObjectName(Object
the bean that will be exposed under the returned ObjectName
managedBean
,
String
the key associated with this bean in the beans map passed to the MBeanExporter
beanKey
)

Implements org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

Returns an instance of ObjectName based on the identity of the managed resource.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HASH_CODE_KEYback to summary
public static final String HASH_CODE_KEY

The hash code key.

TYPE_KEYback to summary
public static final String TYPE_KEY

The type key.

Constructor Detail

IdentityNamingStrategyback to summary
public IdentityNamingStrategy()

Method Detail

getObjectNameback to summary
public ObjectName getObjectName(Object managedBean, String beanKey) throws MalformedObjectNameException

Implements org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

Returns an instance of ObjectName based on the identity of the managed resource.

Parameters
managedBean:Object

Doc from org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

the bean that will be exposed under the returned ObjectName

beanKey:String

Doc from org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

the key associated with this bean in the beans map passed to the MBeanExporter

Returns:ObjectName

Doc from org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

the ObjectName instance

Annotations
@Override
Exceptions
MalformedObjectNameException:

Doc from org.springframework.jmx.export.naming.ObjectNamingStrategy.getObjectName.

if the resulting ObjectName is invalid