org.openbp.common.generic.msgcontainer
Class NullMsgContainer

java.lang.Object
  extended by org.openbp.common.generic.msgcontainer.NullMsgContainer
All Implemented Interfaces:
MsgContainer

public final class NullMsgContainer
extends java.lang.Object
implements MsgContainer

Implementation of a message container that does nothing. All messages will be discarded. This class is a singleton.

Author:
Heiko Erhardt

Method Summary
 void addMsg(java.lang.Object source, java.lang.String msg)
          Adds a message to the message list.
 void addMsg(java.lang.Object source, java.lang.String msg, java.lang.Object[] args)
          Adds a message to the message list.
 void addMsg(java.lang.String msgType, java.lang.Object source, java.lang.String msg)
          Adds a message to the message list.
 void addMsg(java.lang.String msgType, java.lang.Object source, java.lang.String msg, java.lang.Object[] args)
          Adds a message to the message list.
static NullMsgContainer getInstance()
          Gets the singleton instance of this class.
 java.lang.String toString()
          Returns a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getInstance

public static NullMsgContainer getInstance()
Gets the singleton instance of this class.


addMsg

public void addMsg(java.lang.Object source,
                   java.lang.String msg,
                   java.lang.Object[] args)
Adds a message to the message list. The message will be formatted according to the rules specified in the MsgFormat class.

Specified by:
addMsg in interface MsgContainer
Parameters:
source - Object that caused the message
msg - Message to add
args - Message arguments or null

addMsg

public void addMsg(java.lang.Object source,
                   java.lang.String msg)
Adds a message to the message list.

Specified by:
addMsg in interface MsgContainer
Parameters:
source - Object that caused the message
msg - Message to add

addMsg

public void addMsg(java.lang.String msgType,
                   java.lang.Object source,
                   java.lang.String msg,
                   java.lang.Object[] args)
Adds a message to the message list. The message will be formatted according to the rules specified in the MsgFormat class.

Specified by:
addMsg in interface MsgContainer
Parameters:
msgType - Message type
source - Object that caused the message
msg - Message to add
args - Message arguments or null

addMsg

public void addMsg(java.lang.String msgType,
                   java.lang.Object source,
                   java.lang.String msg)
Adds a message to the message list.

Specified by:
addMsg in interface MsgContainer
Parameters:
msgType - Message type
source - Object that caused the message
msg - Message to add

toString

public java.lang.String toString()
Returns a string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
The empty string


Copyright © 2011. All Rights Reserved.