Class ThreadDumper


  • public class ThreadDumper
    extends Object
    This is a helper class for dumping thread stacks.
    • Constructor Detail

      • ThreadDumper

        public ThreadDumper()
        Base constructor.
    • Method Detail

      • printThreads

        public final void printThreads​(PrintWriter pw,
                                       boolean withStackTrace)
        Prints all available thread groups, threads and a summary of threads availability. The thread groups and the threads will be sorted alphabetically regardless of the case.
        Parameters:
        pw - the writer where to print the threads information
        withStackTrace - to include or not the stack traces
      • printThread

        public final void printThread​(PrintWriter pw,
                                      Thread thread,
                                      boolean withStackTrace)
        Prints information for the given thread.
        Parameters:
        pw - the writer where to print the threads information
        thread - the thread for which to print the information
        withStackTrace - to include or not the stack traces