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| Constructor and Description |
|---|
EmbeddedJmxTransFactory(org.springframework.core.io.ResourceLoader resourceLoader) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
|
SpringEmbeddedJmxTrans |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setBeanName(String beanName) |
void |
setConfigurationScanPeriodInSeconds(int configurationScanPeriodInSeconds) |
void |
setConfigurationUrl(String configurationUrl) |
void |
setConfigurationUrls(List<String> configurationUrls) |
void |
setIgnoreConfigurationNotFound(boolean ignoreConfigurationNotFound) |
@Autowired public EmbeddedJmxTransFactory(org.springframework.core.io.ResourceLoader resourceLoader)
public SpringEmbeddedJmxTrans getObject() throws Exception
getObject in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>Exceptionpublic void destroy()
throws Exception
See Josh Long: What's a FactoryBean?
One important takeaway here is that it is theFactoryBean, 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.
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>public void setConfigurationUrl(String configurationUrl)
configurationUrl - coma delimited listpublic void setIgnoreConfigurationNotFound(boolean ignoreConfigurationNotFound)
public void setBeanName(String beanName)
setBeanName in interface org.springframework.beans.factory.BeanNameAwarepublic void setConfigurationScanPeriodInSeconds(int configurationScanPeriodInSeconds)
Copyright © 2015. All Rights Reserved.