Class BeanPublisher

java.lang.Object
com.j256.simplejmx.spring.BeanPublisher
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class BeanPublisher extends Object implements org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.DisposableBean
Utility class designed to be used with Spring which runs through and discovers any beans that need to be registered with the JmxServer. This looks for beans that are of type JmxBean, that are of type PublishAllBeanWrapper, that implement JmxSelfNaming, or that are annotated with JmxResource,

NOTE: This will only compile if com.springframework jar(s) are available to the application. Otherwise it will throw ClassNotFound exceptions if used.

Author:
graywatson
  • Constructor Details

    • BeanPublisher

      public BeanPublisher()
    • BeanPublisher

      public BeanPublisher(org.springframework.context.ApplicationContext applicationContext, JmxServer jmxServer)
  • Method Details

    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • destroy

      public void destroy()
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException
    • setJmxServer

      public void setJmxServer(JmxServer jmxServer)