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 interface
ThreadDumpMessage.ThreadInfoFactory
Factory 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 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()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getFormattedMessage
public java.lang.String getFormattedMessage()
Returns the ThreadDump in printable format.- Specified by:
getFormattedMessage
in interfaceMessage
- Returns:
- the ThreadDump suitable for logging.
-
formatTo
public void formatTo(java.lang.StringBuilder sb)
- Specified by:
formatTo
in 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:
getParameters
in interfaceMessage
- Returns:
- the "parameters" to this Message.
-
getThrowable
public java.lang.Throwable getThrowable()
Always returns null.- Specified by:
getThrowable
in interfaceMessage
- Returns:
- null
-
-