Package org.springframework.jmx.access

Examples of org.springframework.jmx.access.MBeanProxyFactoryBean


    @SuppressWarnings("unchecked")
    public<T> T getProxy(ObjectName name, Class<T> type) {
        Reference r = proxies.get(name);
        T proxy = (r != null) ? (T) r.get() : null;
        if (proxy == null) {
            MBeanProxyFactoryBean factory = new EnhancedMBeanProxyFactoryBean();
            factory.setServer(server);
            try {
                factory.setObjectName(name);
            } catch (MalformedObjectNameException e) {
                throw new IllegalStateException(e);
            }
            factory.setProxyInterface(type);
            factory.setUseStrictCasing(false);
            factory.afterPropertiesSet();
            proxy = (T) factory.getObject();
            proxies.put(name, new SoftReference<Object>(proxy));
        }
        return proxy;
    }
View Full Code Here


    @SuppressWarnings("unchecked")
    public<T> T getProxy(ObjectName name, Class<T> type) {
        Reference r = proxies.get(name);
        T proxy = (r != null) ? (T) r.get() : null;
        if (proxy == null) {
            MBeanProxyFactoryBean factory = new MBeanProxyFactoryBean();
            factory.setServer(server);
            try {
                factory.setObjectName(name);
            } catch (MalformedObjectNameException e) {
                throw new IllegalStateException(e);
            }
            factory.setProxyInterface(type);
            factory.setUseStrictCasing(false);
            factory.afterPropertiesSet();
            proxy = (T) factory.getObject();
            proxies.put(name, new SoftReference<Object>(proxy));
        }
        return proxy;
    }
View Full Code Here

    return connected;
  }

  private static Object getMBean(MBeanServerConnectionFactoryBean connectionFactory, String objectName,
      Class<?> interfaceType) throws MalformedObjectNameException {
    MBeanProxyFactoryBean factory = new MBeanProxyFactoryBean();
    factory.setObjectName(objectName);
    factory.setProxyInterface(interfaceType);
    factory.setServer(connectionFactory.getObject());
    factory.afterPropertiesSet();
    return factory.getObject();
  }
View Full Code Here

    @SuppressWarnings("unchecked")
    public<T> T getProxy(ObjectName name, Class<T> type) {
        Reference r = proxies.get(name);
        T proxy = (r != null) ? (T) r.get() : null;
        if (proxy == null) {
            MBeanProxyFactoryBean factory = new MBeanProxyFactoryBean();
            factory.setServer(server);
            try {
                factory.setObjectName(name.toString());
            } catch (MalformedObjectNameException e) {
                throw new IllegalStateException(e);
            }
            factory.setProxyInterface(type);
            factory.setUseStrictCasing(false);
            factory.afterPropertiesSet();
            proxy = (T) factory.getObject();
            proxies.put(name, new SoftReference<Object>(proxy));
        }
        return proxy;
    }
View Full Code Here

TOP

Related Classes of org.springframework.jmx.access.MBeanProxyFactoryBean

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.