Package org.jppf.management.diagnostics
Class TextThreadDumpWriter
java.lang.Object
org.jppf.management.diagnostics.AbstractThreadDumpWriter
org.jppf.management.diagnostics.TextThreadDumpWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,ThreadDumpWriter
This class prints a thread dump nicely formatted as plain text to a character stream.
- Author:
- Laurent Cohen
-
Field Summary
Fields inherited from class org.jppf.management.diagnostics.AbstractThreadDumpWriter
indent, indentLevel, indentString, out, title -
Constructor Summary
ConstructorsConstructorDescriptionTextThreadDumpWriter(Writer writer, String title) 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) Print the specified thread dump directly to a plain text string.Methods inherited from class org.jppf.management.diagnostics.AbstractThreadDumpWriter
close, decIndent, getIndent, incIndent, printString, simpleName, simpleName
-
Constructor Details
-
TextThreadDumpWriter
Intiialize this printer with the specified writer.- Parameters:
writer- the writer to print to.title- the tittle given for the output.
-
-
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
Print the specified thread dump directly to a plain text string.- Parameters:
dump- the thread dump to print.title- title given to the dump.- Returns:
- the thread dump printed to a string, or null if it could not be printed.
-