Package net.jmesnil.jmx.core.tree

Examples of net.jmesnil.jmx.core.tree.DomainNode


    if( obj instanceof DelayProxy ) {
      return "Loading...";
    }
   
    if (obj instanceof DomainNode) {
      DomainNode node = (DomainNode) obj;
      return node.getDomain();
    }
    if (obj instanceof ObjectNameNode) {
      ObjectNameNode node = (ObjectNameNode) obj;
      return node.getValue();
    }
    if (obj instanceof PropertyNode) {
      PropertyNode node = (PropertyNode) obj;
      return node.getValue();
    }
    if (obj instanceof MBeanInfoWrapper) {
      MBeanInfoWrapper wrapper = (MBeanInfoWrapper) obj;
      return wrapper.getObjectName().toString();
    }
View Full Code Here


        if (parent instanceof Root) {
            Root root = (Root) parent;
            return root.getChildren();
        }
        if (parent instanceof DomainNode) {
            DomainNode node = (DomainNode) parent;
            return node.getChildren();
        }
        if (parent instanceof ObjectNameNode) {
            ObjectNameNode node = (ObjectNameNode) parent;
            return node.getMbeanInfoWrapper().getMBeanFeatureInfos();
        }
        if (parent instanceof Node) {
            Node node = (Node) parent;
            return node.getChildren();
        }
        return new Object[0];
    }
View Full Code Here

        NodeBuilder.addToTree(root, on);

        Node[] children = root.getChildren();
        assertEquals(1, children.length);
        assertTrue(children[0] instanceof DomainNode);
        DomainNode domainNode = (DomainNode) children[0];
        assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$

        children = domainNode.getChildren();
        assertEquals(1, children.length);
        assertTrue(children[0] instanceof PropertyNode);
        PropertyNode typeNode = (PropertyNode) children[0];
        assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
        assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
View Full Code Here

        NodeBuilder.addToTree(root, on2);

        Node[] children = root.getChildren();
        assertEquals(1, children.length);
        assertTrue(children[0] instanceof DomainNode);
        DomainNode domainNode = (DomainNode) children[0];
        assertEquals("test", domainNode.getDomain()); //$NON-NLS-1$

        children = domainNode.getChildren();
        assertEquals(1, children.length);
        assertTrue(children[0] instanceof PropertyNode);
        PropertyNode typeNode = (PropertyNode) children[0];
        assertEquals("type", typeNode.getKey()); //$NON-NLS-1$
        assertEquals("Test", typeNode.getValue()); //$NON-NLS-1$
View Full Code Here

        Node[] children = root.getChildren();
        assertEquals(2, children.length);
        assertTrue(children[0] instanceof DomainNode);
        assertTrue(children[1] instanceof DomainNode);
        DomainNode domainNode1 = (DomainNode) children[0];
        DomainNode domainNode2 = (DomainNode) children[1];
        // domains are sorted by lexical order
        assertEquals("other", domainNode1.getDomain()); //$NON-NLS-1$
        assertEquals("test", domainNode2.getDomain()); //$NON-NLS-1$
    }
View Full Code Here

TOP

Related Classes of net.jmesnil.jmx.core.tree.DomainNode

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.