private static class DefaultFlowMessageFactory.AbstractFlowMessage extends java.lang.Object implements FlowMessage
Modifier and Type | Field and Description |
---|---|
private Message |
message |
private static long |
serialVersionUID |
private java.lang.String |
text |
Constructor and Description |
---|
AbstractFlowMessage(java.lang.String text,
Message message) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFormat()
Gets the format portion of the Message.
|
java.lang.String |
getFormattedMessage()
Gets the Message formatted as a String.
|
Message |
getMessage()
The wrapped message
|
java.lang.Object[] |
getParameters()
Gets parameter values, if any.
|
java.lang.String |
getText()
The message text like "Enter" or "Exit" used to prefix the actual Message.
|
java.lang.Throwable |
getThrowable()
Gets the throwable, if any.
|
private static final long serialVersionUID
private final Message message
private final java.lang.String text
AbstractFlowMessage(java.lang.String text, Message message)
public java.lang.String getFormattedMessage()
Message
When configured to log asynchronously, this method is called before the Message is queued, unless this
message implements ReusableMessage
or is annotated with AsynchronouslyFormattable
.
This gives the Message implementation class a chance to create a formatted message String with the current value
of any mutable objects.
The intention is that the Message implementation caches this formatted message and returns it on subsequent
calls. (See LOG4J2-763.)
When logging synchronously, this method will not be called for Messages that implement the
StringBuilderFormattable
interface: instead, the
formatTo(StringBuilder)
method will be called so the
Message can format its contents without creating intermediate String objects.
getFormattedMessage
in interface Message
public java.lang.String getFormat()
Message
getFormat
in interface Message
public java.lang.Object[] getParameters()
Message
getParameters
in interface Message
public java.lang.Throwable getThrowable()
Message
getThrowable
in interface Message
public Message getMessage()
FlowMessage
getMessage
in interface FlowMessage
public java.lang.String getText()
FlowMessage
getText
in interface FlowMessage