Example usage for org.springframework.jmx.access MBeanProxyFactoryBean afterPropertiesSet

List of usage examples for org.springframework.jmx.access MBeanProxyFactoryBean afterPropertiesSet

Introduction

In this page you can find the example usage for org.springframework.jmx.access MBeanProxyFactoryBean afterPropertiesSet.

Prototype

@Override
public void afterPropertiesSet() throws MBeanServerNotFoundException, MBeanInfoRetrievalException 

Source Link

Document

Checks that the proxyInterface has been specified and then generates the proxy for the target MBean.

Usage

From source file:org.springframework.batch.sample.launch.RemoteLauncherTests.java

private static Object getMBean(MBeanServerConnectionFactoryBean connectionFactory, String objectName,
        Class<?> interfaceType) throws MalformedObjectNameException {
    MBeanProxyFactoryBean factory = new MBeanProxyFactoryBean();
    factory.setObjectName(objectName);//from  w  w  w. ja v a 2 s.  c om
    factory.setProxyInterface(interfaceType);
    factory.setServer(connectionFactory.getObject());
    factory.afterPropertiesSet();
    return factory.getObject();
}