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()
          Generate a ThreadDumpMessage with no title.
ThreadDumpMessage(String title)
          Generate a ThreadDumpMessage with a title.
 
Method Summary
 String getFormattedMessage()
          Return the ThreadDump in printable format.
 String getMessageFormat()
          Returns the title.
 Object[] getParameters()
          Returns an array with a single element, a Map containing the ThreadInformation as the key.
 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()
Generate a ThreadDumpMessage with no title.


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()
Return the ThreadDump in printable format.

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

getMessageFormat

public String getMessageFormat()
Returns the title.

Specified by:
getMessageFormat 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.


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.