Top Description Inners Fields Constructors Methods
org.apache.logging.log4j.message

public Class ThreadDumpMessage

extends Object
implements Message, StringBuilderFormattable
Class Inheritance
All Implemented Interfaces
org.apache.logging.log4j.util.StringBuilderFormattable, org.apache.logging.log4j.message.Message, java.io.Serializable
Annotations
@AsynchronouslyFormattable
@ServiceConsumer:ThreadInfoFactory
resolution:optional
cardinality:single
Static Imports
org.apache.logging.log4j.util.Chars.LF

Captures information about all running Threads.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
ThreadDumpMessage.BasicThreadInfoFactory

Factory to create basic thread information.

private static class
ThreadDumpMessage.ThreadDumpMessageProxy

Proxy pattern used to serialize the ThreadDumpMessage.

public static interface
ThreadDumpMessage.ThreadInfoFactory

Factory to create Thread information.

Field Summary

Modifier and TypeField and Description
private static final Lazy<ThreadDumpMessage.ThreadInfoFactory>
private String
private static final long
private volatile Map<ThreadInformation, StackTraceElement[]>
private final String

Constructor Summary

AccessConstructor and Description
public
ThreadDumpMessage(final String
The title.
title
)

Generate a ThreadDumpMessage with a title.

private
ThreadDumpMessage(final String formattedMsg, final String title)

Method Summary

Modifier and TypeMethod and Description
public void
formatTo(final StringBuilder
the StringBuilder to write into
sb
)

Implements org.apache.logging.log4j.util.StringBuilderFormattable.formatTo.

Writes a text representation of this object into the specified StringBuilder, ideally without allocating temporary objects.

public String

Returns:

the title.
getFormat
()

Implements org.apache.logging.log4j.message.Message.getFormat.

Returns the title.

public String

Returns:

the ThreadDump suitable for logging.
getFormattedMessage
()

Implements org.apache.logging.log4j.message.Message.getFormattedMessage.

Returns the ThreadDump in printable format.

public Object[]

Returns:

the "parameters" to this Message.
getParameters
()

Implements org.apache.logging.log4j.message.Message.getParameters.

Returns an array with a single element, a Map containing the ThreadInformation as the key.

public Throwable

Returns:

null
getThrowable
()

Implements org.apache.logging.log4j.message.Message.getThrowable.

Always returns null.

private static ThreadDumpMessage.ThreadInfoFactory
private void
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

protected Object

Returns:

a ThreadDumpMessageProxy.
writeReplace
()

Creates a ThreadDumpMessageProxy that can be serialized.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

FACTORYback to summary
private static final Lazy<ThreadDumpMessage.ThreadInfoFactory> FACTORY
formattedMessageback to summary
private String formattedMessage
serialVersionUIDback to summary
private static final long serialVersionUID
threadsback to summary
private volatile Map<ThreadInformation, StackTraceElement[]> threads
titleback to summary
private final String title

Constructor Detail

ThreadDumpMessageback to summary
public ThreadDumpMessage(final String title)

Generate a ThreadDumpMessage with a title.

Parameters
title:String

The title.

ThreadDumpMessageback to summary
private ThreadDumpMessage(final String formattedMsg, final String title)

Method Detail

formatToback to summary
public void formatTo(final StringBuilder sb)

Implements org.apache.logging.log4j.util.StringBuilderFormattable.formatTo.

Doc from org.apache.logging.log4j.util.StringBuilderFormattable.formatTo.

Writes a text representation of this object into the specified StringBuilder, ideally without allocating temporary objects.

Parameters
sb:StringBuilder

the StringBuilder to write into

Annotations
@Override
getFormatback to summary
public String getFormat()

Implements org.apache.logging.log4j.message.Message.getFormat.

Returns the title.

Returns:String

the title.

Annotations
@Override
getFormattedMessageback to summary
public String getFormattedMessage()

Implements org.apache.logging.log4j.message.Message.getFormattedMessage.

Returns the ThreadDump in printable format.

Returns:String

the ThreadDump suitable for logging.

Annotations
@Override
getParametersback to summary
public Object[] getParameters()

Implements org.apache.logging.log4j.message.Message.getParameters.

Returns an array with a single element, a Map containing the ThreadInformation as the key. and the StackTraceElement array as the value;

Returns:Object[]

the "parameters" to this Message.

Annotations
@Override
getThrowableback to summary
public Throwable getThrowable()

Implements org.apache.logging.log4j.message.Message.getThrowable.

Always returns null.

Returns:Throwable

null

Annotations
@Override
initFactoryback to summary
private static ThreadDumpMessage.ThreadInfoFactory initFactory()
readObjectback to summary
private void readObject(final ObjectInputStream stream) throws InvalidObjectException
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
writeReplaceback to summary
protected Object writeReplace()

Creates a ThreadDumpMessageProxy that can be serialized.

Returns:Object

a ThreadDumpMessageProxy.

org.apache.logging.log4j.message back to summary

private Class ThreadDumpMessage.BasicThreadInfoFactory

extends Object
implements ThreadInfoFactory
Class Inheritance
  • java.lang.Object
  • org.apache.logging.log4j.message.ThreadDumpMessage.BasicThreadInfoFactory
All Implemented Interfaces
org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory

Factory to create basic thread information.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Map<ThreadInformation, StackTraceElement[]>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BasicThreadInfoFactoryback to summary
private BasicThreadInfoFactory()

Method Detail

createThreadInfoback to summary
public Map<ThreadInformation, StackTraceElement[]> createThreadInfo()

Implements org.apache.logging.log4j.message.ThreadDumpMessage.ThreadInfoFactory.createThreadInfo.

Annotations
@Override
org.apache.logging.log4j.message back to summary

private Class ThreadDumpMessage.ThreadDumpMessageProxy

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • org.apache.logging.log4j.message.ThreadDumpMessage.ThreadDumpMessageProxy
All Implemented Interfaces
java.io.Serializable

Proxy pattern used to serialize the ThreadDumpMessage.

Field Summary

Modifier and TypeField and Description
private final String
private static final long
private final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected Object

Returns:

a ThreadDumpMessage.
readResolve
()

Returns a ThreadDumpMessage using the data in the proxy.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

formattedMsgback to summary
private final String formattedMsg
serialVersionUIDback to summary
private static final long serialVersionUID
titleback to summary
private final String title

Constructor Detail

ThreadDumpMessageProxyback to summary
pack-priv ThreadDumpMessageProxy(final ThreadDumpMessage msg)

Method Detail

readResolveback to summary
protected Object readResolve()

Returns a ThreadDumpMessage using the data in the proxy.

Returns:Object

a ThreadDumpMessage.

org.apache.logging.log4j.message back to summary

public Interface ThreadDumpMessage.ThreadInfoFactory

Known Direct Implementers
org.apache.logging.log4j.message.ThreadDumpMessage.BasicThreadInfoFactory

Factory to create Thread information.

Implementations of this class are loaded via the standard java Service Provider interface.

Method Summary

Modifier and TypeMethod and Description
public Map<ThreadInformation, StackTraceElement[]>

Method Detail

createThreadInfoback to summary
public Map<ThreadInformation, StackTraceElement[]> createThreadInfo()