Class ThreadDumpMessage

  • All Implemented Interfaces:
    java.io.Serializable, Message, org.apache.logging.log4j.util.StringBuilderFormattable

    @AsynchronouslyFormattable
    public class ThreadDumpMessage
    extends java.lang.Object
    implements Message, org.apache.logging.log4j.util.StringBuilderFormattable
    Captures information about all running Threads.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadDumpMessage​(java.lang.String title)
      Generate a ThreadDumpMessage with a title.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void formatTo​(java.lang.StringBuilder sb)  
      java.lang.String getFormat()
      Returns the title.
      java.lang.String getFormattedMessage()
      Returns the ThreadDump in printable format.
      java.lang.Object[] getParameters()
      Returns an array with a single element, a Map containing the ThreadInformation as the key.
      java.lang.Throwable getThrowable()
      Always returns null.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ThreadDumpMessage

        public ThreadDumpMessage​(java.lang.String title)
        Generate a ThreadDumpMessage with a title.
        Parameters:
        title - The title.
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFormattedMessage

        public java.lang.String getFormattedMessage()
        Returns the ThreadDump in printable format.
        Specified by:
        getFormattedMessage in interface Message
        Returns:
        the ThreadDump suitable for logging.
      • formatTo

        public void formatTo​(java.lang.StringBuilder sb)
        Specified by:
        formatTo in interface org.apache.logging.log4j.util.StringBuilderFormattable
      • getFormat

        public java.lang.String getFormat()
        Returns the title.
        Specified by:
        getFormat in interface Message
        Returns:
        the title.
      • getParameters

        public java.lang.Object[] getParameters()
        Returns an array with a single element, a Map containing the ThreadInformation as the key. and the StackTraceElement array as the value;
        Specified by:
        getParameters in interface Message
        Returns:
        the "parameters" to this Message.
      • getThrowable

        public java.lang.Throwable getThrowable()
        Always returns null.
        Specified by:
        getThrowable in interface Message
        Returns:
        null