com.ls.lars.communication
Class MessageFactory
java.lang.Object
|
+--com.ls.lars.communication.MessageFactory
- public class MessageFactory
- extends Object
This class is utilized for creating Message
objects.
Note:
This class can only be used by some specific lars components, which
are configured within the LarsSecurityManager
.
Any other attempt to access this class will result in an SecurityExcpeption.
- Version:
- $Revision: 1.3 $
- Author:
- Last modified by $Author: ODrugan $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getMessageFactory
public static MessageFactory getMessageFactory()
- Constructs the 'singleton' MessageFactory object and returns it.
This constructor first checks whether or not the caller is allowed
to obtain a reference of MessageFactory.
If the check fails, a SecurityException will be raised.
- Returns:
- the single instance of MessageFactory
createMessage
public Message createMessage(Map map)
throws InvalidArgumentException
- This method just calls
Message.createMessage(Map)
in order to
create a Message object from the given map.
- Parameters:
map
- a Map containing message specific information- Returns:
- an instance of Message
- Throws:
InvalidArgumentException
- If it is thrown by the Message's implementation of createMessage(Map)