Package wt.jmx.core
Class XMLDumper
java.lang.Object
wt.jmx.core.XMLDumper
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
Supported API: true
Extendable: false
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdumpAllMBeansToXml(OutputStream outputStream, boolean indent, String xsltUrlString, boolean transformNow) Outputs basic XML data (optionally transformed by XSLT) for all MBeans currently registered with the MBeanServer.static StringdumpAllMBeansToXml(Writer writer, boolean indent, String xsltUrlString, boolean transformNow) Outputs basic XML data (optionally transformed by XSLT) for all MBeans currently registered with the MBeanServer.static voiddumpAllMBeansToXml(ContentHandler listener) Outputs basic XML data for all MBeans currently registered with the MBeanServer as SAX2 XML parser events.static voiddumpMBeanAttrValueToXml(ContentHandler listener, Object attrValue) Renders a given MBean attribute value as XML in the form of SAX2 XML parser events.static StringdumpMBeansToXml(OutputStream outputStream, Collection<ObjectName> objectNameSet, boolean indent, String xsltUrlString, boolean transformNow) Outputs basic XML data (optionally transformed by XSLT) for selected MBeans currently registered with the MBeanServer.static StringdumpMBeansToXml(Writer writer, Collection<ObjectName> objectNameSet, boolean indent, String xsltUrlString, boolean transformNow) Outputs basic XML data (optionally transformed by XSLT) for selected MBeans currently registered with the MBeanServer.static voiddumpMBeansToXml(ContentHandler listener, Collection<ObjectName> objectNameSet) Outputs basic XML data for selected MBeans currently registered with the MBeanServer as SAX2 XML parser events.
-
Field Details
-
DEFAULT_XSLT
Resource path of default XSLT stylesheet
Supported API: true- See Also:
-
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 sentindent- whether XML should be indentedxsltUrlString- URL, file path, or classpath-based resource reference to XSLT stylesheettransformNow- 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 sentindent- whether XML should be indentedxsltUrlString- URL, file path, or classpath-based resource reference to XSLT stylesheettransformNow- 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
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 sentobjectNameSet- collection of ObjectNames of MBeans to output data forindent- whether XML should be indentedxsltUrlString- URL, file path, or classpath-based resource reference to XSLT stylesheettransformNow- 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 sentobjectNameSet- collection of ObjectNames of MBeans to output data forindent- whether XML should be indentedxsltUrlString- URL, file path, or classpath-based resource reference to XSLT stylesheettransformNow- 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 sentobjectNameSet- 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 sentattrValue- MBean attribute value to output data for- Throws:
SAXException
-