Package net.jmesnil.jmx.core

Examples of net.jmesnil.jmx.core.MBeanNotificationInfoWrapper


        TreeViewer notificationViewer = new TreeViewer(notificationTree);
        notificationViewer.setLabelProvider(new LabelProvider() {
            public String getText(Object element) {
                if (element instanceof MBeanNotificationInfoWrapper) {
                    MBeanNotificationInfoWrapper notifWrapper = (MBeanNotificationInfoWrapper) element;
                    return notifWrapper.getMBeanNotificationInfo().getName();
                }
                return super.getText(element);
            }
        });
        notificationViewer.setContentProvider(new ITreeContentProvider() {
            public Object[] getChildren(Object parent) {
                if (parent instanceof MBeanNotificationInfoWrapper) {
                    MBeanNotificationInfoWrapper notifWrapper = (MBeanNotificationInfoWrapper) parent;
                    return notifWrapper.getMBeanNotificationInfo()
                            .getNotifTypes();
                }
                return new Object[0];
            }

            public Object getParent(Object element) {
                return null;
            }

            public boolean hasChildren(Object element) {
                if (element instanceof MBeanNotificationInfoWrapper) {
                    MBeanNotificationInfoWrapper notifWrapper = (MBeanNotificationInfoWrapper) element;
                    return (notifWrapper.getMBeanNotificationInfo()
                            .getNotifTypes().length > 0);
                }
                return false;
            }
View Full Code Here

TOP

Related Classes of net.jmesnil.jmx.core.MBeanNotificationInfoWrapper

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.