public class PerformanceMonitorBeanFactory extends PerformanceMonitorFactory implements org.springframework.beans.factory.InitializingBean
PerformanceMonitorBean
instances and keep track
of the created instances. If the MBeanExportOperations
is set, then the
PerformanceMonitorBean will be automatically exported as a JMX MBean.Constructor and Description |
---|
PerformanceMonitorBeanFactory()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
void |
createInitialPerformanceMonitors()
Create the initial
PerformanceMonitorBean instances. |
PerformanceMonitor |
createPerformanceMonitor(String name)
Create a new
PerformanceMonitorBean and map it to the provided
name. |
PerformanceMonitorBean |
findPerformanceMonitorBean(String name)
Find an existing
PerformanceMonitorBean |
void |
setInitialPerformanceMonitors(List<String> initialPerformanceMonitors)
Set the list of initial
PerformanceMonitorBean instances to create. |
void |
setMBeanExporter(org.springframework.jmx.export.MBeanExporter mBeanExporter)
Deprecated.
|
void |
setMBeanExportOperations(org.springframework.jmx.export.MBeanExportOperations mBeanExportOperations)
Set the
MBeanExportOperations to use to export
PerformanceMonitorBean instances as JMX MBeans. |
void |
setPackageScanBase(String packageScanBase)
If specified, PerformanceMonitorBeanFactory will scan all classes
under packageScanBase for methods with the
PerformanceMonitor annotation
and initialize performance monitors for them. |
addPerformanceMonitorToMap, findPerformanceMonitor, getPerformanceMonitorNames
public PerformanceMonitorBeanFactory()
public void afterPropertiesSet()
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
public void setInitialPerformanceMonitors(List<String> initialPerformanceMonitors)
PerformanceMonitorBean
instances to create.initialPerformanceMonitors
- the list of PerformanceMonitorBean
namespublic void setPackageScanBase(String packageScanBase)
PerformanceMonitor
annotation
and initialize performance monitors for them.packageScanBase
- Where should the scan for annotations beginpublic void createInitialPerformanceMonitors()
PerformanceMonitorBean
instances.@Deprecated public void setMBeanExporter(org.springframework.jmx.export.MBeanExporter mBeanExporter)
MBeanExporter
to use to export
PerformanceMonitorBean
instances as JMX MBeans.mBeanExporter
- the MBeanExporter
to set.public void setMBeanExportOperations(org.springframework.jmx.export.MBeanExportOperations mBeanExportOperations)
MBeanExportOperations
to use to export
PerformanceMonitorBean
instances as JMX MBeans.mBeanExportOperations
- the MBeanExportOperations
to set.public PerformanceMonitor createPerformanceMonitor(String name)
PerformanceMonitorBean
and map it to the provided
name. If the MBeanExportOperations
is set, then the
PerformanceMonitorBean will be exported as a JMX MBean.
If the PerformanceMonitor already exists, then the existing instance is
returned.createPerformanceMonitor
in class PerformanceMonitorFactory
name
- the value for the PerformanceMonitorBean
PerformanceMonitorBean
IllegalArgumentException
- if the MBean value is invalid.public PerformanceMonitorBean findPerformanceMonitorBean(String name)
PerformanceMonitorBean
name
- the value for the PerformanceMonitorBean
PerformanceMonitorBean
, or null if it is not
found.Copyright © 2019. All Rights Reserved.