Examples of AMXProxy


Examples of org.glassfish.admin.amx.core.AMXProxy

            }
        }
    }

    private List<AMXProxy> listChildren(final String path, boolean recursive) {
        final AMXProxy topProxy = resolveToProxy(path);
        if (topProxy == null) {
            return null;
        }

        final List<AMXProxy> list = new ArrayList<AMXProxy>();
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

        final ObjectName top = resolvePath(path);
        if (top == null) {
            return null;
        }

        final AMXProxy topProxy = getProxyFactory().getProxy(top, AMXProxy.class);
        final List<AMXProxy> list = new ArrayList<AMXProxy>();
        list.add(topProxy);
        listChildren(topProxy, list, true);

        final String NL = "\n";
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

     */
    public static List<ObjectName> getAncestors(
            final MBeanServer server,
            final ObjectName start) {
        //debug( "ObjectNameBuilder.getAncestors(): type = " + start );
        AMXProxy amx = ProxyFactory.getInstance(server).getProxy(start, AMXProxy.class);
        final List<ObjectName> ancestors = new ArrayList<ObjectName>();

        AMXProxy parent = null;
        while ((parent = amx.parent()) != null) {
            ancestors.add(parent.extra().objectName());
            amx = parent;
        }

        Collections.reverse(ancestors);

View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

        final String parentPath = PathnameParser.path( parent);
        final String path = PathnameParser.path(parentPath, type, childName);
        final String pathProp = Util.makeProp(PATH_KEY,path);
        props = Util.concatenateProps(pathProp, props);
         */
        final AMXProxy parentProxy = ProxyFactory.getInstance(server).getProxy(parent, AMXProxy.class);
        final String parentPath = parentProxy.path();
        final String parentPathProp = Util.makeProp(PARENT_PATH_KEY, Util.quoteIfNeeded(parentPath));
        props = Util.concatenateProps(parentPathProp, props);

        return JMXUtil.newObjectName(parent.getDomain(), props);
    }
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

     */
    public static List<ObjectName> getAncestors(
            final MBeanServer server,
            final ObjectName start) {
        //debug( "ObjectNameBuilder.getAncestors(): type = " + start );
        AMXProxy amx = ProxyFactory.getInstance(server).getProxy(start, AMXProxy.class);
        final List<ObjectName> ancestors = new ArrayList<ObjectName>();

        AMXProxy parent = null;
        while ((parent = amx.parent()) != null) {
            ancestors.add(parent.extra().objectName());
            amx = parent;
        }

        Collections.reverse(ancestors);

View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

        final String parentPath = PathnameParser.path( parent);
        final String path = PathnameParser.path(parentPath, type, childName);
        final String pathProp = Util.makeProp(PATH_KEY,path);
        props = Util.concatenateProps(pathProp, props);
         */
        final AMXProxy parentProxy = ProxyFactory.getInstance(server).getProxy(parent, AMXProxy.class);
        final String parentPath = parentProxy.path();
        final String parentPathProp = Util.makeProp(PARENT_PATH_KEY, Util.quoteIfNeeded(parentPath));
        props = Util.concatenateProps(parentPathProp, props);

        return JMXUtil.newObjectName(parent.getDomain(), props);
    }
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

        if (info == null) {
            return null;
        }

        final Class<? extends AMXProxy> intf = genericInterface(info);
        final AMXProxy proxy = getProxy(objectName, info, intf);
        return proxy;
    }
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

    <T extends AMXProxy> T getProxy(
            final ObjectName objectName,
            final MBeanInfo mbeanInfoIn,
            final Class<T> intfIn) {
        //debug( "ProxyFactory.createProxy: " + objectName + " of class " + expected.getName() + " with interface " + JMXUtil.interfaceName(mbeanInfo) + ", descriptor = " + mbeanInfo.getDescriptor() );
        AMXProxy proxy = null;

        try {
            MBeanInfo mbeanInfo = mbeanInfoIn;
            if (mbeanInfo == null) {
                mbeanInfo = getMBeanInfo(objectName);
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

    public Set<AMXProxy> toProxySet(final Set<ObjectName> objectNames) {
        final Set<AMXProxy> s = new HashSet<AMXProxy>();

        for (final ObjectName objectName : objectNames) {
            try {
                final AMXProxy proxy = getProxy(objectName);
                if (proxy != null) {
                    s.add(proxy);
                }
            } catch (final Exception e) {
                debug("ProxyFactory.toProxySet: exception for MBean ",
View Full Code Here

Examples of org.glassfish.admin.amx.core.AMXProxy

     * registered.
     */
    public Set<AMXProxy> toProxySet(final ObjectName[] objectNames, final Class<? extends AMXProxy> intf) {
        final Set<AMXProxy> result = new HashSet<AMXProxy>();
        for (final ObjectName objectName : objectNames) {
            final AMXProxy proxy = getProxy(objectName, intf);
            if (proxy != null) {
                result.add(proxy);
            }
        }
        return (result);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.