List of usage examples for org.springframework.jmx.export.assembler AutodetectCapableMBeanInfoAssembler includeBean
boolean includeBean(Class<?> beanClass, String beanName);
From source file:org.springframework.jmx.export.assembler.AbstractAutodetectTests.java
public void testAutodetect() throws Exception { if (Attributes.getAttributes(JmxTestBean.class).size() == 0) { return;/*from www .j av a2 s.com*/ } JmxTestBean bean = new JmxTestBean(); AutodetectCapableMBeanInfoAssembler assembler = getAssembler(); assertTrue("The bean should be included", assembler.includeBean(bean.getClass(), "testBean")); }
From source file:org.springframework.jmx.export.MBeanExporter.java
/** * Invoked when using an <code>AutodetectCapableMBeanInfoAssembler</code>. * Gives the assembler the opportunity to add additional beans from the * <code>BeanFactory</code> to the list of beans to be exposed via JMX. * <p>This implementation prevents a bean from being added to the list * automatically if it has already been added manually, and it prevents * certain internal classes from being registered automatically. *//*from w w w .ja v a 2s. c om*/ private void autodetectBeans(final AutodetectCapableMBeanInfoAssembler assembler) { autodetect(new AutodetectCallback() { public boolean include(Class beanClass, String beanName) { return assembler.includeBean(beanClass, beanName); } }); }