org.apache.logging.log4j.message
Class ThreadDumpMessage

java.lang.Object
  extended by org.apache.logging.log4j.message.ThreadDumpMessage
All Implemented Interfaces:
Serializable, Message

public class ThreadDumpMessage
extends Object
implements Message

Captures information about all running Threads.

See Also:
Serialized Form

Constructor Summary
ThreadDumpMessage(String title)
          Generate a ThreadDumpMessage with a title.
 
Method Summary
 String getFormat()
          Returns the title.
 String getFormattedMessage()
          Returns the ThreadDump in printable format.
 Object[] getParameters()
          Returns an array with a single element, a Map containing the ThreadInformation as the key.
 Throwable getThrowable()
          Always returns null.
 String toString()
           
protected  Object writeReplace()
          Creates a ThreadDumpMessageProxy that can be serialized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadDumpMessage

public ThreadDumpMessage(String title)
Generate a ThreadDumpMessage with a title.

Parameters:
title - The title.
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getFormattedMessage

public String getFormattedMessage()
Returns the ThreadDump in printable format.

Specified by:
getFormattedMessage in interface Message
Returns:
the ThreadDump suitable for logging.

getFormat

public String getFormat()
Returns the title.

Specified by:
getFormat in interface Message
Returns:
the title.

getParameters

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

writeReplace

protected Object writeReplace()
Creates a ThreadDumpMessageProxy that can be serialized.

Returns:
a ThreadDumpMessageProxy.

getThrowable

public Throwable getThrowable()
Always returns null.

Specified by:
getThrowable in interface Message
Returns:
null


Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.