Package org.apache.logging.log4j.message
Class DefaultFlowMessageFactory
java.lang.Object
org.apache.logging.log4j.message.DefaultFlowMessageFactory
- All Implemented Interfaces:
Serializable,FlowMessageFactory
Default factory for flow messages.
- Since:
- 2.6
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static final classprivate static final class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a message factory with"Enter"and"Exit"as the default flow strings.DefaultFlowMessageFactory(String entryText, String exitText) Constructs a message factory with the given entry and exit strings. -
Method Summary
Modifier and TypeMethodDescriptionGets the entry text.Gets the exit text.private MessagemakeImmutable(Message message) newEntryMessage(Message message) Creates a new entry message based on an existing message.newExitMessage(Object result, EntryMessage message) Creates a new exit message based on a return value and an existing entry message.newExitMessage(Object result, Message message) Creates a new exit message based on a return value and an existing message.newExitMessage(EntryMessage message) Creates a new exit message based on no return value and an existing entry message.
-
Field Details
-
EXIT_DEFAULT_PREFIX
- See Also:
-
ENTRY_DEFAULT_PREFIX
- See Also:
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
entryText
-
exitText
-
-
Constructor Details
-
DefaultFlowMessageFactory
public DefaultFlowMessageFactory()Constructs a message factory with"Enter"and"Exit"as the default flow strings. -
DefaultFlowMessageFactory
Constructs a message factory with the given entry and exit strings.- Parameters:
entryText- the text to use for trace entry, like"Enter".exitText- the text to use for trace exit, like"Exit".
-
-
Method Details
-
getEntryText
Gets the entry text.- Returns:
- the entry text.
-
getExitText
Gets the exit text.- Returns:
- the exit text.
-
newEntryMessage
Description copied from interface:FlowMessageFactoryCreates a new entry message based on an existing message.- Specified by:
newEntryMessagein interfaceFlowMessageFactory- Parameters:
message- the original message- Returns:
- the new entry message
-
makeImmutable
-
newExitMessage
Description copied from interface:FlowMessageFactoryCreates a new exit message based on no return value and an existing entry message.- Specified by:
newExitMessagein interfaceFlowMessageFactory- Parameters:
message- the original entry message- Returns:
- the new exit message
-
newExitMessage
Description copied from interface:FlowMessageFactoryCreates a new exit message based on a return value and an existing entry message.- Specified by:
newExitMessagein interfaceFlowMessageFactory- Parameters:
result- the return value.message- the original entry message- Returns:
- the new exit message
-
newExitMessage
Description copied from interface:FlowMessageFactoryCreates a new exit message based on a return value and an existing message.- Specified by:
newExitMessagein interfaceFlowMessageFactory- Parameters:
result- the return value.message- the original message- Returns:
- the new exit message
-