Package org.apache.logging.log4j.message
Class AbstractMessageFactory
java.lang.Object
org.apache.logging.log4j.message.AbstractMessageFactory
- All Implemented Interfaces:
Serializable
,MessageFactory
,MessageFactory2
- Direct Known Subclasses:
FormattedMessageFactory
,LocalizedMessageFactory
,MessageFormatMessageFactory
,ParameterizedMessageFactory
,ParameterizedNoReferenceMessageFactory
,SimpleMessageFactory
,StringFormatterMessageFactory
public abstract class AbstractMessageFactory
extends Object
implements MessageFactory2, Serializable
Provides an abstract superclass for
MessageFactory2
implementations with default implementations (and for
MessageFactory
by extension).
This class is immutable.
Note to implementors:
Subclasses can implement the MessageFactory2
methods when they can most effectively build Message
instances. If a subclass does not implement MessageFactory2
methods, these calls are routed through
newMessage(String, Object...)
in this class.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionnewMessage
(CharSequence message) Creates a new message for the specified CharSequence.newMessage
(Object message) Creates a new message based on an Object.newMessage
(String message) Creates a new message based on a String.newMessage
(String message, Object p0) Creates a new parameterized message.newMessage
(String message, Object p0, Object p1) Creates a new parameterized message.newMessage
(String message, Object p0, Object p1, Object p2) Creates a new parameterized message.Creates a new parameterized message.Creates a new parameterized message.Creates a new parameterized message.newMessage
(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) Creates a new parameterized message.newMessage
(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) Creates a new parameterized message.newMessage
(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) Creates a new parameterized message.newMessage
(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) Creates a new parameterized message.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.message.MessageFactory
newMessage
-
Constructor Details
-
AbstractMessageFactory
public AbstractMessageFactory()
-
-
Method Details
-
newMessage
Description copied from interface:MessageFactory2
Creates a new message for the specified CharSequence.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- the (potentially mutable) CharSequence- Returns:
- a new message for the specified CharSequence
-
newMessage
Description copied from interface:MessageFactory
Creates a new message based on an Object.- Specified by:
newMessage
in interfaceMessageFactory
- Parameters:
message
- a message object- Returns:
- a new message
-
newMessage
Description copied from interface:MessageFactory
Creates a new message based on a String.- Specified by:
newMessage
in interfaceMessageFactory
- Parameters:
message
- a message String- Returns:
- a new message
-
newMessage
Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5) Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameterp5
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6) Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameterp5
- a message parameterp6
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7) Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameterp5
- a message parameterp6
- a message parameterp7
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8) Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameterp5
- a message parameterp6
- a message parameterp7
- a message parameterp8
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-
newMessage
public Message newMessage(String message, Object p0, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7, Object p8, Object p9) Description copied from interface:MessageFactory2
Creates a new parameterized message.- Specified by:
newMessage
in interfaceMessageFactory2
- Parameters:
message
- a message template, the kind of message template depends on the implementation.p0
- a message parameterp1
- a message parameterp2
- a message parameterp3
- a message parameterp4
- a message parameterp5
- a message parameterp6
- a message parameterp7
- a message parameterp8
- a message parameterp9
- a message parameter- Returns:
- a new message
- Since:
- 2.6.1
- See Also:
-