类 KeyNamingStrategy
java.lang.Object
cn.taketoday.jmx.export.naming.KeyNamingStrategy
- 所有已实现的接口:
InitializingBean,ObjectNamingStrategy
ObjectNamingStrategy implementation that builds
ObjectName instances from the key used in the
"beans" map passed to MBeanExporter.
Can also check object name mappings, given as Properties
or as mappingLocations of properties files. The key used
to look up is the key used in MBeanExporter's "beans" map.
If no mapping is found for a given key, the key itself is used to
build an ObjectName.
- 从以下版本开始:
- 4.0
- 作者:
- Rob Harrop, Juergen Hoeller
- 另请参阅:
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidMerges thePropertiesconfigured in themappingsandmappingLocationsinto the finalPropertiesinstance used forObjectNameresolution.getObjectName(Object managedBean, String beanKey) Attempts to retrieve theObjectNamevia the given key, trying to find a mapped value in the mappings first.voidsetMappingLocation(cn.taketoday.core.io.Resource location) Set a location of a properties file to be loaded, containing object name mappings.voidsetMappingLocations(cn.taketoday.core.io.Resource... mappingLocations) Set location of properties files to be loaded, containing object name mappings.voidsetMappings(Properties mappings) Set local properties, containing object name mappings, e.g. via the "props" tag in XML bean definitions.
-
字段详细资料
-
logger
protected final cn.taketoday.logging.Logger loggerLoginstance for this class.
-
-
构造器详细资料
-
KeyNamingStrategy
public KeyNamingStrategy()
-
-
方法详细资料
-
setMappings
Set local properties, containing object name mappings, e.g. via the "props" tag in XML bean definitions. These can be considered defaults, to be overridden by properties loaded from files. -
setMappingLocation
public void setMappingLocation(cn.taketoday.core.io.Resource location) Set a location of a properties file to be loaded, containing object name mappings. -
setMappingLocations
public void setMappingLocations(cn.taketoday.core.io.Resource... mappingLocations) Set location of properties files to be loaded, containing object name mappings. -
afterPropertiesSet
Merges thePropertiesconfigured in themappingsandmappingLocationsinto the finalPropertiesinstance used forObjectNameresolution.- 指定者:
afterPropertiesSet在接口中InitializingBean- 抛出:
IOException
-
getObjectName
public ObjectName getObjectName(Object managedBean, @Nullable String beanKey) throws MalformedObjectNameException Attempts to retrieve theObjectNamevia the given key, trying to find a mapped value in the mappings first.- 指定者:
getObjectName在接口中ObjectNamingStrategy- 参数:
managedBean- the bean that will be exposed under the returnedObjectNamebeanKey- the key associated with this bean in the beans map passed to theMBeanExporter- 返回:
- the
ObjectNameinstance - 抛出:
MalformedObjectNameException- if the resultingObjectNameis invalid
-