infoservice.agreement.multicast.messages
Class EchoMulticastMessageFactory
java.lang.Object
infoservice.agreement.multicast.messages.EchoMulticastMessageFactory
public class EchoMulticastMessageFactory
- extends java.lang.Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_instance
private static final EchoMulticastMessageFactory m_instance
EchoMulticastMessageFactory
public EchoMulticastMessageFactory()
getInstance
public static EchoMulticastMessageFactory getInstance()
- Singleton pattern
- Returns:
- The only instance of
EchoMulticastMessageFactory
parseMessage
public IAgreementMessage parseMessage(org.w3c.dom.Document a_doc)
- Parses the given XML Document and creates an instance of
IAgreementMessage
depending on which type of message is
contained in the XML.
- Parameters:
a_doc
- The document to be parsed
- Returns:
- An
IAgreementMessage
getNodeValue
private java.lang.String getNodeValue(org.w3c.dom.Node tmp)
checkOriginator
private boolean checkOriginator(org.w3c.dom.Node a_node,
java.lang.String a_sender)
createEchoMessage
private EchoMessage createEchoMessage(org.w3c.dom.Node a_node)
- Creates an
EchoMessage
out of the given node
- Parameters:
a_node
- The node containing the XML representation of the
EchoMessage
- Returns:
- The
EchoMessage