Package net.jmesnil.jmx.core

Examples of net.jmesnil.jmx.core.MBeanInfoWrapper


    if (obj instanceof PropertyNode) {
      PropertyNode node = (PropertyNode) obj;
      return node.getValue();
    }
    if (obj instanceof MBeanInfoWrapper) {
      MBeanInfoWrapper wrapper = (MBeanInfoWrapper) obj;
      return wrapper.getObjectName().toString();
    }
    if (obj instanceof MBeanOperationInfoWrapper) {
      MBeanOperationInfoWrapper wrapper = (MBeanOperationInfoWrapper) obj;
      return MBeanUtils.prettySignature(wrapper.getMBeanOperationInfo());
    }
    if (obj instanceof MBeanAttributeInfoWrapper) {
      MBeanAttributeInfoWrapper wrapper = (MBeanAttributeInfoWrapper) obj;
      return wrapper.getMBeanAttributeInfo().getName();
    }
    return obj.toString();
  }
View Full Code Here


    public static IEditorInput getEditorInput(Object input) {
        Assert.isNotNull(input);

        if (input instanceof ObjectNameNode) {
            ObjectNameNode node = (ObjectNameNode) input;
            MBeanInfoWrapper wrapper = node.getMbeanInfoWrapper();
            return new MBeanEditorInput(wrapper);
        }
        if (input instanceof MBeanInfoWrapper) {
            MBeanInfoWrapper wrapper = (MBeanInfoWrapper) input;
            return new MBeanEditorInput(wrapper);
        }
        if (input instanceof MBeanFeatureInfoWrapper) {
            MBeanFeatureInfoWrapper wrapper = (MBeanFeatureInfoWrapper) input;
            return new MBeanEditorInput(wrapper.getMBeanInfoWrapper());
        }

        return null;
    }
View Full Code Here

        if (adaptableObject instanceof DomainWrapper) {
            DomainWrapper domain = (DomainWrapper) adaptableObject;
            return new DomainPropertySourceAdapter(domain.getName());
        }
        if (adaptableObject instanceof MBeanInfoWrapper) {
            MBeanInfoWrapper wrapper = (MBeanInfoWrapper) adaptableObject;
            return new MBeanInfoPropertySourceAdapter(wrapper.getObjectName(),
                    wrapper.getMBeanInfo());
        }
        if (adaptableObject instanceof MBeanAttributeInfoWrapper) {
            MBeanAttributeInfoWrapper wrapper = (MBeanAttributeInfoWrapper) adaptableObject;
            return new MBeanAttributeInfoPropertySourceAdapter(wrapper
                    .getMBeanAttributeInfo(), wrapper.getObjectName(), wrapper
                    .getMBeanServerConnection());
        }
        if (adaptableObject instanceof MBeanOperationInfoWrapper) {
            MBeanOperationInfoWrapper wrapper = (MBeanOperationInfoWrapper) adaptableObject;
            return new MBeanOperationInfoPropertySourceAdapter(wrapper
                    .getMBeanOperationInfo());
        }
        return null;
    }
View Full Code Here

    @Override
    public void init(IEditorSite site, IEditorInput input)
            throws PartInitException {
        super.init(site, input);
        MBeanInfoWrapper wrapper = ((MBeanEditorInput) input).getWrapper();
        setPartName(wrapper.getObjectName().getCanonicalName());
    }
View Full Code Here

                List mbeans = new ArrayList();
                Iterator iter = set.iterator();
                while (iter.hasNext()) {
                    ObjectName objectName = (ObjectName) iter.next();
                    MBeanInfo info = mbsc.getMBeanInfo(objectName);
                    mbeans.add(new MBeanInfoWrapper(objectName, info, mbsc));
                }
                Collections.sort(mbeans);
                viewer.setInput(mbeans);
            } catch (Exception e) {
                e.printStackTrace();
View Full Code Here

        if (selected == null) {
            setResult(null);
            return;
        }
        if (selected instanceof MBeanInfoWrapper) {
            MBeanInfoWrapper wrapper = (MBeanInfoWrapper) selected;
            List results = new ArrayList();
            results.add(wrapper);
            setResult(results);
        }
    }
View Full Code Here

      final ObjectName on2 = on;
      try {
        connectionWrapper.run(new IJMXRunnable() {
          public void run(MBeanServerConnection mbsc) throws JMXException {
          try {
            array[0] = new MBeanInfoWrapper(on2, mbsc.getMBeanInfo(on2), mbsc);
          } catch (InstanceNotFoundException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          } catch (IntrospectionException e) {
            // TODO Auto-generated catch block
View Full Code Here

TOP

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

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.