Java Code Examples for javax.management.MBeanInfo#getDescription()

The following examples show how to use javax.management.MBeanInfo#getDescription() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MBeanIntrospector.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 2
Source File: MBeanIntrospector.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 3
Source File: MBeanIntrospector.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 4
Source File: MBeanIntrospector.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 5
Source File: MBeanIntrospector.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 6
Source File: MBeanIntrospector.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 7
Source File: MBeanIntrospector.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 8
Source File: MBeanIntrospector.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 9
Source File: MBeanIntrospector.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 10
Source File: MBeanIntrospector.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/**
 * Return the MBeanInfo for the given resource, based on the given
 * per-interface data.
 */
final MBeanInfo getMBeanInfo(Object resource, PerInterface<M> perInterface) {
    MBeanInfo mbi =
            getClassMBeanInfo(resource.getClass(), perInterface);
    MBeanNotificationInfo[] notifs = findNotifications(resource);
    if (notifs == null || notifs.length == 0)
        return mbi;
    else {
        return new MBeanInfo(mbi.getClassName(),
                mbi.getDescription(),
                mbi.getAttributes(),
                mbi.getConstructors(),
                mbi.getOperations(),
                notifs,
                mbi.getDescriptor());
    }
}
 
Example 11
Source File: StandardMBeanSupport.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 12
Source File: StandardMBeanSupport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 13
Source File: StandardMBeanSupport.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 14
Source File: StandardMBeanSupport.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 15
Source File: JmxWebHandler.java    From simplejmx with ISC License 5 votes vote down vote up
private void displayClassInfo(BufferedWriter writer, MBeanInfo mbeanInfo) throws IOException {
	writer.append("ClassName: " + mbeanInfo.getClassName() + "<br />\n");
	if (mbeanInfo.getDescription() != null) {
		writer.append("Description: " + makeHtmlSafe(mbeanInfo.getDescription()) + "<br />\n");
	}
	writer.append("<br />\n");
}
 
Example 16
Source File: StandardMBeanSupport.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 17
Source File: AbstractControl.java    From activemq-artemis with Apache License 2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
   if (AuditLogger.isEnabled()) {
      AuditLogger.getMBeanInfo(this);
   }
   MBeanInfo info = super.getMBeanInfo();
   return new MBeanInfo(info.getClassName(), info.getDescription(), fillMBeanAttributeInfo(), info.getConstructors(), fillMBeanOperationInfo(), info.getNotifications());
}
 
Example 18
Source File: StandardMBeanSupport.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 19
Source File: StandardMBeanSupport.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
@Override
public MBeanInfo getMBeanInfo() {
    MBeanInfo mbi = super.getMBeanInfo();
    Class<?> resourceClass = getResource().getClass();
    if (StandardMBeanIntrospector.isDefinitelyImmutableInfo(resourceClass))
        return mbi;
    return new MBeanInfo(mbi.getClassName(), mbi.getDescription(),
            mbi.getAttributes(), mbi.getConstructors(),
            mbi.getOperations(),
            MBeanIntrospector.findNotifications(getResource()),
            mbi.getDescriptor());
}
 
Example 20
Source File: ObjectNameRenderer.java    From text-ui with GNU General Public License v3.0 4 votes vote down vote up
@Override
public LineRenderer renderer(Iterator<ObjectName> stream) {

  MBeanServer server = ManagementFactory.getPlatformMBeanServer();

  List<ObjectName> names = Utils.list(stream);
  Collections.sort(names);

  //
  TableElement table = new TableElement().overflow(Overflow.HIDDEN).rightCellPadding(1);

  // Header
  table.add(
    new RowElement().
      style(Decoration.bold.fg(Color.black).bg(Color.white)).
      add("NAME", "CLASSNAME", "MXBEAN", "DESCRIPTION")
  );

  //
  for (ObjectName name : names) {

    String className;
    String description;
    String mxbean;
    try {
      MBeanInfo info = server.getMBeanInfo(name);
      className = info.getClassName();
      description = info.getDescription();
      Object mxbeanValue = info.getDescriptor().getFieldValue("mxbean");
      mxbean = mxbeanValue != null ? mxbeanValue.toString() : "false";
    }
    catch (JMException ignore) {
      className = "";
      description = "";
      mxbean = "";
    }

    //
    table.row("" + name, className, mxbean, description);
  }

  //
  return table.renderer();
}