org.apache.logging.log4j.message
Class SimpleMessage

java.lang.Object
  extended by org.apache.logging.log4j.message.SimpleMessage
All Implemented Interfaces:
Serializable, Message

public class SimpleMessage
extends Object
implements Message, Serializable

The simplest possible implementation of Message. It just returns the String given as the constructor argument.

See Also:
Serialized Form

Constructor Summary
SimpleMessage()
          Basic constructor.
SimpleMessage(String message)
          Constructor that includes the message.
 
Method Summary
 boolean equals(Object o)
           
 String getFormattedMessage()
          Return the message.
 String getMessageFormat()
          Return the message.
 Object[] getParameters()
          Returns null since there are no parameters.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleMessage

public SimpleMessage()
Basic constructor.


SimpleMessage

public SimpleMessage(String message)
Constructor that includes the message.

Parameters:
message - The String message.
Method Detail

getFormattedMessage

public String getFormattedMessage()
Return the message.

Specified by:
getFormattedMessage in interface Message
Returns:
the message.

getMessageFormat

public String getMessageFormat()
Return the message.

Specified by:
getMessageFormat in interface Message
Returns:
the message.

getParameters

public Object[] getParameters()
Returns null since there are no parameters.

Specified by:
getParameters in interface Message
Returns:
null.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 1999-2012 Apache Software Foundation. All Rights Reserved.