infoservice.agreement.multicast.messages
Class EchoMulticastMessageFactory

java.lang.Object
  extended by infoservice.agreement.multicast.messages.EchoMulticastMessageFactory

public class EchoMulticastMessageFactory
extends java.lang.Object


Field Summary
private static EchoMulticastMessageFactory m_instance
           
 
Constructor Summary
EchoMulticastMessageFactory()
           
 
Method Summary
private  boolean checkOriginator(org.w3c.dom.Node a_node, java.lang.String a_sender)
           
private  EchoMessage createEchoMessage(org.w3c.dom.Node a_node)
          Creates an EchoMessage out of the given node
static EchoMulticastMessageFactory getInstance()
          Singleton pattern
private  java.lang.String getNodeValue(org.w3c.dom.Node tmp)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_instance

private static final EchoMulticastMessageFactory m_instance
Constructor Detail

EchoMulticastMessageFactory

public EchoMulticastMessageFactory()
Method Detail

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