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 application
  • classpath:org/jmxtrans/embedded/config/jmxtrans-internals.json: provided by jmxtrans jar for its internal monitoring
Author:
Cyrille Le Clerc
  • Constructor Details

    • EmbeddedJmxTransFactory

      public EmbeddedJmxTransFactory()
      A default constructor is required
    • EmbeddedJmxTransFactory

      public EmbeddedJmxTransFactory​(org.springframework.core.io.ResourceLoader resourceLoader)
  • Method Details

    • getObject

      public SpringEmbeddedJmxTrans getObject() throws Exception
      Specified by:
      getObject in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
      Throws:
      Exception
    • destroy

      public void destroy() throws Exception

      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 from getObject(), and will make no attempt to exercise any lifecycle hooks or anything else on it.

      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception
    • getObjectType

      public Class<?> getObjectType()
      Specified by:
      getObjectType in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
    • isSingleton

      public boolean isSingleton()
      Specified by:
      isSingleton in interface org.springframework.beans.factory.FactoryBean<SpringEmbeddedJmxTrans>
    • setConfigurationUrl

      public void setConfigurationUrl​(String configurationUrl)
      Parameters:
      configurationUrl - coma delimited list
    • setConfigurationUrls

      public void setConfigurationUrls​(List<String> configurationUrls)
    • setIgnoreConfigurationNotFound

      public void setIgnoreConfigurationNotFound​(boolean ignoreConfigurationNotFound)
    • setBeanName

      public void setBeanName​(String beanName)
      Specified by:
      setBeanName in interface org.springframework.beans.factory.BeanNameAware
    • setConfigurationScanPeriodInSeconds

      public void setConfigurationScanPeriodInSeconds​(int configurationScanPeriodInSeconds)
    • setResourceLoader

      @Autowired public void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)