org.springframework.integration.monitor
Class IntegrationMBeanExporter
java.lang.Object
org.springframework.jmx.support.MBeanRegistrationSupport
org.springframework.jmx.export.MBeanExporter
org.springframework.integration.monitor.IntegrationMBeanExporter
- All Implemented Interfaces:
- BeanClassLoaderAware, BeanFactoryAware, BeanPostProcessor, DisposableBean, InitializingBean, Lifecycle, Phased, SmartLifecycle, ObjectNameLocator, MBeanExportOperations
@ManagedResource
public class IntegrationMBeanExporter
- extends MBeanExporter
- implements BeanPostProcessor, BeanFactoryAware, BeanClassLoaderAware, SmartLifecycle, ObjectNameLocator
MBean exporter for Spring Integration components in an existing application.
- Author:
- Dave Syer, Helena Edelson
Methods inherited from class org.springframework.jmx.export.MBeanExporter |
adaptMBeanIfPossible, afterPropertiesSet, createAndConfigureMBean, createModelMBean, getObjectName, isBeanDefinitionLazyInit, isMBean, onRegister, onUnregister, registerBeanNameOrInstance, registerManagedResource, registerManagedResource, setAllowEagerInit, setAssembler, setAutodetect, setAutodetectMode, setAutodetectModeName, setBeans, setEnsureUniqueRuntimeObjectNames, setExcludedBeans, setExposeManagedResourceClassLoader, setListeners, setNamingStrategy, setNotificationListenerMappings, setNotificationListeners, unregisterManagedResource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_DOMAIN
public static final String DEFAULT_DOMAIN
- See Also:
- Constant Field Values
IntegrationMBeanExporter
public IntegrationMBeanExporter()
setBeanClassLoader
public void setBeanClassLoader(ClassLoader classLoader)
- Specified by:
setBeanClassLoader
in interface BeanClassLoaderAware
- Overrides:
setBeanClassLoader
in class MBeanExporter
setObjectNameStaticProperties
public void setObjectNameStaticProperties(Map<String,String> objectNameStaticProperties)
- Static properties that will be added to all object names.
- Parameters:
objectNameStaticProperties
- the objectNameStaticProperties to set
setDomain
public void setDomain(String domain)
- The JMX domain to use for MBeans registered. Defaults to
spring.application
(which is useful in
SpringSource HQ).
- Parameters:
domain
- the domain name to set
setBeanFactory
public void setBeanFactory(BeanFactory beanFactory)
throws BeansException
- Specified by:
setBeanFactory
in interface BeanFactoryAware
- Overrides:
setBeanFactory
in class MBeanExporter
- Throws:
BeansException
postProcessAfterInitialization
public Object postProcessAfterInitialization(Object bean,
String beanName)
throws BeansException
- Specified by:
postProcessAfterInitialization
in interface BeanPostProcessor
- Throws:
BeansException
postProcessBeforeInitialization
public Object postProcessBeforeInitialization(Object bean,
String beanName)
throws BeansException
- Specified by:
postProcessBeforeInitialization
in interface BeanPostProcessor
- Throws:
BeansException
registerBeans
protected void registerBeans()
- Overrides:
registerBeans
in class MBeanExporter
isAutoStartup
public final boolean isAutoStartup()
- Specified by:
isAutoStartup
in interface SmartLifecycle
getPhase
public final int getPhase()
- Specified by:
getPhase
in interface Phased
isRunning
public final boolean isRunning()
- Specified by:
isRunning
in interface Lifecycle
start
public final void start()
- Specified by:
start
in interface Lifecycle
stop
public final void stop()
- Specified by:
stop
in interface Lifecycle
stop
public final void stop(Runnable callback)
- Specified by:
stop
in interface SmartLifecycle
doStop
protected void doStop()
doStart
protected void doStart()
destroy
public void destroy()
- Specified by:
destroy
in interface DisposableBean
- Overrides:
destroy
in class MBeanExporter
getChannelCount
@ManagedMetric(metricType=COUNTER,
displayName="MessageChannel Channel Count")
public double getChannelCount()
getHandlerCount
@ManagedMetric(metricType=COUNTER,
displayName="MessageHandler Handler Count")
public double getHandlerCount()
getHandlerNames
@ManagedAttribute
public Collection<String> getHandlerNames()
getChannelNames
@ManagedAttribute
public Collection<String> getChannelNames()
getObjectName
@ManagedOperation(description="Get the JMX object name (as a String) for the specified Spring bean name")
public String getObjectName(String beanName)
- Specified by:
getObjectName
in interface ObjectNameLocator
getObjectNames
@ManagedAttribute(description="Get a map from Spring bean names to JMX object names registered by this exporter")
public Map<String,String> getObjectNames()
- Specified by:
getObjectNames
in interface ObjectNameLocator
getHandlerMeanDuration
public double getHandlerMeanDuration(String name)
getChannelSendCount
public long getChannelSendCount(String name)
getChannelSendErrorCount
public long getChannelSendErrorCount(String name)
getChannelReceiveCount
public long getChannelReceiveCount(String name)
getChannelSendRate
public double getChannelSendRate(String name)
getChannelErrorRate
public double getChannelErrorRate(String name)
getChannelMeanSendDuration
public double getChannelMeanSendDuration(String name)
Copyright © 2010. All Rights Reserved.