use of org.springframework.jmx.access.MBeanProxyFactoryBean in project opennms by OpenNMS.
the class JmxDaemonStatusDao method buildProxy.
private ServiceDaemon buildProxy(ObjectName mBeanName) {
MBeanProxyFactoryBean mBeanProxyFactoryBean = new MBeanProxyFactoryBean();
try {
mBeanProxyFactoryBean.setObjectName(mBeanName.getCanonicalName());
} catch (MalformedObjectNameException e) {
throw new JmxObjectNameException("Object name '" + mBeanName.getCanonicalName() + "' was malformed!", e);
}
mBeanProxyFactoryBean.setProxyInterface(ServiceDaemon.class);
mBeanProxyFactoryBean.afterPropertiesSet();
return (ServiceDaemon) mBeanProxyFactoryBean.getObject();
}
Aggregations