Class HTMLThreadDumpWriter

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

public class HTMLThreadDumpWriter extends AbstractThreadDumpWriter
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.
Author:
Laurent Cohen
  • Constructor Details

    • HTMLThreadDumpWriter

      public HTMLThreadDumpWriter(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.
    • HTMLThreadDumpWriter

      public HTMLThreadDumpWriter(Writer writer, String title, int fontSize, boolean includeBody)
      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

      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, 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.