Package org.jppf.management.diagnostics
Class HTMLThreadDumpWriter
java.lang.Object
org.jppf.management.diagnostics.AbstractThreadDumpWriter
org.jppf.management.diagnostics.HTMLThreadDumpWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,ThreadDumpWriter
This class prints a thread dump nicely formatted as HTML to a character stream.
This is used by the adminsitration console to display a thread dump for a selected driver or node.
This is used by the adminsitration console to display a thread dump for a selected driver or node.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.management.diagnostics.AbstractThreadDumpWriter
indent, indentLevel, indentString, out, title -
Constructor Summary
ConstructorsConstructorDescriptionHTMLThreadDumpWriter(Writer writer, String title) Intiialize this printer with the specified writer.HTMLThreadDumpWriter(Writer writer, String title, int fontSize, boolean includeBody) Intiialize this printer with the specified writer. -
Method Summary
Modifier and TypeMethodDescriptionvoidprintDeadlocks(ThreadDump threadDump) Print the deadlocked threads information.voidprintThread(ThreadInformation thread) Print information about a thread.voidprintThreadDump(ThreadDump threadDump) Print the specified thread dump.static StringprintToString(ThreadDump dump, String title, boolean includeBody, int fontSize) Print the specified thread dump directly to a string.Methods inherited from class org.jppf.management.diagnostics.AbstractThreadDumpWriter
close, decIndent, getIndent, incIndent, printString, simpleName, simpleName
-
Constructor Details
-
HTMLThreadDumpWriter
Intiialize this printer with the specified writer.- Parameters:
writer- the writer to print to.title- the tittle given for the output.
-
HTMLThreadDumpWriter
Intiialize this printer with the specified writer.- Parameters:
writer- the writer to print to.title- the title given for the output.fontSize- the font size used in the html rendering of the thread dump.includeBody- whether to add the html and body tags.
-
-
Method Details
-
printDeadlocks
Description copied from interface:ThreadDumpWriterPrint the deadlocked threads information.- Parameters:
threadDump- the thread dump which provides the information to print.
-
printThread
Description copied from interface:ThreadDumpWriterPrint information about a thread.- Parameters:
thread- the information to print.
-
printThreadDump
Description copied from interface:ThreadDumpWriterPrint the specified thread dump.- Specified by:
printThreadDumpin interfaceThreadDumpWriter- Overrides:
printThreadDumpin classAbstractThreadDumpWriter- Parameters:
threadDump- the thread dump to print.
-
printToString
public static String printToString(ThreadDump dump, String title, boolean includeBody, int fontSize) Print the specified thread dump directly to a string.- Parameters:
dump- the thread dump to print.title- title given to the dump.includeBody- whether to add the <html> and <body> tags.fontSize- the size of the font used to write the thread dump.- Returns:
- the thread dump printed to an HTML string, or null if it could not be printed.
-