Package org.apache.logging.log4j.message
Class DefaultFlowMessageFactory
- java.lang.Object
-
- org.apache.logging.log4j.message.DefaultFlowMessageFactory
-
- All Implemented Interfaces:
Serializable
,FlowMessageFactory
public class DefaultFlowMessageFactory extends Object implements FlowMessageFactory, Serializable
Default factory for flow messages.- Since:
- 2.6
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultFlowMessageFactory()
Constructs 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getEntryText()
Gets the entry text.String
getExitText()
Gets the exit text.EntryMessage
newEntryMessage(Message message)
Creates a new entry message based on an existing message.ExitMessage
newExitMessage(Object result, EntryMessage message)
Creates a new exit message based on a return value and an existing entry message.ExitMessage
newExitMessage(Object result, Message message)
Creates a new exit message based on a return value and an existing message.ExitMessage
newExitMessage(EntryMessage message)
Creates a new exit message based on no return value and an existing entry message.
-
-
-
Method Detail
-
getEntryText
public String getEntryText()
Gets the entry text.- Returns:
- the entry text.
-
getExitText
public String getExitText()
Gets the exit text.- Returns:
- the exit text.
-
newEntryMessage
public EntryMessage newEntryMessage(Message message)
Description copied from interface:FlowMessageFactory
Creates a new entry message based on an existing message.- Specified by:
newEntryMessage
in interfaceFlowMessageFactory
- Parameters:
message
- the original message- Returns:
- the new entry message
-
newExitMessage
public ExitMessage newExitMessage(EntryMessage message)
Description copied from interface:FlowMessageFactory
Creates a new exit message based on no return value and an existing entry message.- Specified by:
newExitMessage
in interfaceFlowMessageFactory
- Parameters:
message
- the original entry message- Returns:
- the new exit message
-
newExitMessage
public ExitMessage newExitMessage(Object result, EntryMessage message)
Description copied from interface:FlowMessageFactory
Creates a new exit message based on a return value and an existing entry message.- Specified by:
newExitMessage
in interfaceFlowMessageFactory
- Parameters:
result
- the return value.message
- the original entry message- Returns:
- the new exit message
-
newExitMessage
public ExitMessage newExitMessage(Object result, Message message)
Description copied from interface:FlowMessageFactory
Creates a new exit message based on a return value and an existing message.- Specified by:
newExitMessage
in interfaceFlowMessageFactory
- Parameters:
result
- the return value.message
- the original message- Returns:
- the new exit message
-
-