Package wt.jmx.core

Class XMLDumper

java.lang.Object
wt.jmx.core.XMLDumper

public final class XMLDumper extends Object
This class provides a number of utilities to output MBean attribute data as XML. There is no DTD for the resulting XML and the format is not currently documented. These utilities are supported, however, so that one can reliably produce the same XML format and use the same XSLT stylesheets as those used by core Windchill MBeans.

Supported API: true

Extendable: false
  • Field Details

    • DEFAULT_XSLT

      public static final String DEFAULT_XSLT
      Resource path of default XSLT stylesheet

      Supported API: true
      See Also:
    • DEFAULT_XSLT_URL_STRING

      public static final String DEFAULT_XSLT_URL_STRING
      URL of default XSLT stylesheet

      Supported API: true
  • Method Details

    • dumpAllMBeansToXml

      public static String dumpAllMBeansToXml(Writer writer, boolean indent, String xsltUrlString, boolean transformNow) throws SAXException
      Outputs basic XML data (optionally transformed by XSLT) for all MBeans currently registered with the MBeanServer.

      Supported API: true
      Parameters:
      writer - writer to which output is to be sent
      indent - whether XML should be indented
      xsltUrlString - URL, file path, or classpath-based resource reference to XSLT stylesheet
      transformNow - whether XML should be transformed now by this routine (or whether a processing instruction should just be inserted instead)
      Returns:
      MIME type of resulting output
      Throws:
      SAXException
    • dumpAllMBeansToXml

      public static String dumpAllMBeansToXml(OutputStream outputStream, boolean indent, String xsltUrlString, boolean transformNow) throws SAXException
      Outputs basic XML data (optionally transformed by XSLT) for all MBeans currently registered with the MBeanServer.

      Supported API: true
      Parameters:
      outputStream - output stream to which output is to be sent
      indent - whether XML should be indented
      xsltUrlString - URL, file path, or classpath-based resource reference to XSLT stylesheet
      transformNow - whether XML should be transformed now by this routine (or whether a processing instruction should just be inserted instead)
      Returns:
      MIME type of resulting output
      Throws:
      SAXException
    • dumpAllMBeansToXml

      public static void dumpAllMBeansToXml(ContentHandler listener) throws SAXException
      Outputs basic XML data for all MBeans currently registered with the MBeanServer as SAX2 XML parser events.

      Supported API: true
      Parameters:
      listener - SAX2 ContentHandler to which output is to be sent
      Throws:
      SAXException
    • dumpMBeansToXml

      public static String dumpMBeansToXml(Writer writer, Collection<ObjectName> objectNameSet, boolean indent, String xsltUrlString, boolean transformNow) throws SAXException
      Outputs basic XML data (optionally transformed by XSLT) for selected MBeans currently registered with the MBeanServer.

      Supported API: true
      Parameters:
      writer - writer to which output is to be sent
      objectNameSet - collection of ObjectNames of MBeans to output data for
      indent - whether XML should be indented
      xsltUrlString - URL, file path, or classpath-based resource reference to XSLT stylesheet
      transformNow - whether XML should be transformed now by this routine (or whether a processing instruction should just be inserted instead)
      Returns:
      MIME type of resulting output
      Throws:
      SAXException
    • dumpMBeansToXml

      public static String dumpMBeansToXml(OutputStream outputStream, Collection<ObjectName> objectNameSet, boolean indent, String xsltUrlString, boolean transformNow) throws SAXException
      Outputs basic XML data (optionally transformed by XSLT) for selected MBeans currently registered with the MBeanServer.

      Supported API: true
      Parameters:
      outputStream - output stream to which output is to be sent
      objectNameSet - collection of ObjectNames of MBeans to output data for
      indent - whether XML should be indented
      xsltUrlString - URL, file path, or classpath-based resource reference to XSLT stylesheet
      transformNow - whether XML should be transformed now by this routine (or whether a processing instruction should just be inserted instead)
      Returns:
      MIME type of resulting output
      Throws:
      SAXException
    • dumpMBeansToXml

      public static void dumpMBeansToXml(ContentHandler listener, Collection<ObjectName> objectNameSet) throws SAXException
      Outputs basic XML data for selected MBeans currently registered with the MBeanServer as SAX2 XML parser events.

      Supported API: true
      Parameters:
      listener - SAX2 ContentHandler to which output is to be sent
      objectNameSet - collection of ObjectNames of MBeans to output data for
      Throws:
      SAXException
    • dumpMBeanAttrValueToXml

      public static void dumpMBeanAttrValueToXml(ContentHandler listener, Object attrValue) throws SAXException
      Renders a given MBean attribute value as XML in the form of SAX2 XML parser events. This method can clearly be applied to other objects by signature, but is not a generalized object to XML renderer. Rather it specifically handles those cases found in MBean open data.

      Supported API: true
      Parameters:
      listener - SAX2 ContentHandler to which output is to be sent
      attrValue - MBean attribute value to output data for
      Throws:
      SAXException