Class TextThreadDumpWriter

java.lang.Object
org.jppf.management.diagnostics.AbstractThreadDumpWriter
org.jppf.management.diagnostics.TextThreadDumpWriter
All Implemented Interfaces:
Closeable, AutoCloseable, ThreadDumpWriter

public class TextThreadDumpWriter extends AbstractThreadDumpWriter
This class prints a thread dump nicely formatted as plain text to a character stream.
Author:
Laurent Cohen
  • Constructor Details

    • TextThreadDumpWriter

      public TextThreadDumpWriter(Writer writer, String title)
      Intiialize this printer with the specified writer.
      Parameters:
      writer - the writer to print to.
      title - the tittle given for the output.
  • Method Details

    • printDeadlocks

      public void printDeadlocks(ThreadDump threadDump)
      Description copied from interface: ThreadDumpWriter
      Print the deadlocked threads information.
      Parameters:
      threadDump - the thread dump which provides the information to print.
    • printThread

      public void printThread(ThreadInformation thread)
      Description copied from interface: ThreadDumpWriter
      Print information about a thread.
      Parameters:
      thread - the information to print.
    • printThreadDump

      public void printThreadDump(ThreadDump threadDump)
      Description copied from interface: ThreadDumpWriter
      Print the specified thread dump.
      Specified by:
      printThreadDump in interface ThreadDumpWriter
      Overrides:
      printThreadDump in class AbstractThreadDumpWriter
      Parameters:
      threadDump - the thread dump to print.
    • printToString

      public static String printToString(ThreadDump dump, String title)
      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.