Package org.apache.logging.log4j.message
Class ThreadDumpMessage
- java.lang.Object
-
- org.apache.logging.log4j.message.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceThreadDumpMessage.ThreadInfoFactoryFactory to create Thread information.
-
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 voidformatTo(java.lang.StringBuilder sb)java.lang.StringgetFormat()Returns the title.java.lang.StringgetFormattedMessage()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.ThrowablegetThrowable()Always returns null.java.lang.StringtoString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getFormattedMessage
public java.lang.String getFormattedMessage()
Returns the ThreadDump in printable format.- Specified by:
getFormattedMessagein interfaceMessage- Returns:
- the ThreadDump suitable for logging.
-
formatTo
public void formatTo(java.lang.StringBuilder sb)
- Specified by:
formatToin interfaceorg.apache.logging.log4j.util.StringBuilderFormattable
-
getFormat
public java.lang.String getFormat()
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:
getParametersin interfaceMessage- Returns:
- the "parameters" to this Message.
-
getThrowable
public java.lang.Throwable getThrowable()
Always returns null.- Specified by:
getThrowablein interfaceMessage- Returns:
- null
-
-