Package org.jmxtrans.embedded.spring
Class EmbeddedJmxTransFactory
java.lang.Object
org.jmxtrans.embedded.spring.EmbeddedJmxTransFactory
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
public class EmbeddedJmxTransFactory extends Object implements org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>, org.springframework.beans.factory.BeanNameAware, org.springframework.beans.factory.DisposableBean
EmbeddedJmxTrans factory for Spring Framework integration.
Default configurationUrls :
classpath:jmxtrans.json: expected to be provided by the applicationclasspath:org/jmxtrans/embedded/config/jmxtrans-internals.json: provided by jmxtrans jar for its internal monitoring
- Author:
- Cyrille Le Clerc
-
Constructor Summary
Constructors Constructor Description EmbeddedJmxTransFactory()A default constructor is requiredEmbeddedJmxTransFactory(org.springframework.core.io.ResourceLoader resourceLoader) -
Method Summary
Modifier and Type Method Description voiddestroy()SpringEmbeddedJmxTransgetObject()Class<?>getObjectType()booleanisSingleton()voidsetBeanName(String beanName)voidsetConfigurationScanPeriodInSeconds(int configurationScanPeriodInSeconds)voidsetConfigurationUrl(String configurationUrl)voidsetConfigurationUrls(List<String> configurationUrls)voidsetIgnoreConfigurationNotFound(boolean ignoreConfigurationNotFound)voidsetResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
-
Constructor Details
-
EmbeddedJmxTransFactory
public EmbeddedJmxTransFactory()A default constructor is required -
EmbeddedJmxTransFactory
public EmbeddedJmxTransFactory(org.springframework.core.io.ResourceLoader resourceLoader)
-
-
Method Details
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>- Throws:
Exception
-
destroy
See Josh Long: What's a FactoryBean?:
One important takeaway here is that it is the
FactoryBean, not the factoried object itself, that lives in the Spring container and enjoys the lifecycle hooks and container services. The returned instance is transient - Spring knows nothing about what you’ve returned fromgetObject(), and will make no attempt to exercise any lifecycle hooks or anything else on it.- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
-
setConfigurationUrl
- Parameters:
configurationUrl- coma delimited list
-
setConfigurationUrls
-
setIgnoreConfigurationNotFound
public void setIgnoreConfigurationNotFound(boolean ignoreConfigurationNotFound) -
setBeanName
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
setConfigurationScanPeriodInSeconds
public void setConfigurationScanPeriodInSeconds(int configurationScanPeriodInSeconds) -
setResourceLoader
@Autowired public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
-