com.jalios.jstore.jsync
Class Message

java.lang.Object
  extended by com.jalios.jstore.jsync.Message
Direct Known Subclasses:
AckMessage, DisjoinMessage, JoinMessage, SuggestJoinMessage, UpdateMessage

public abstract class Message
extends Object

This abstract class is the super class of all JSync message classes

Version:
$Revision: 20843 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
 
Constructor Summary
Message(org.jdom.Element root)
          Constructs a new Message from an XML element
Message(String urid)
          Constructs a new Message
 
Method Summary
 String getUrid()
           
 String getXmlFooter()
           
 String getXmlHeader()
           
static Message parse(String xml)
          Parse the given XML strings and builds the corresponding JSync message
 String stampToXml(Stamp stamp)
           
 String toString()
           
abstract  String toXml()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values
Constructor Detail

Message

public Message(String urid)
Constructs a new Message

Parameters:
urid - the urid of the sender (i.e. replica that sends this message)
Since:
jcms-4.1

Message

public Message(org.jdom.Element root)
Constructs a new Message from an XML element

Parameters:
root - the root element
Since:
jcms-4.1
Method Detail

getUrid

public String getUrid()
Returns:
the urid of the sender
Since:
jcms-4.1

toString

public String toString()
Overrides:
toString in class Object

toXml

public abstract String toXml()
Returns:
an XML representation of this message
Since:
jcms-4.1

stampToXml

public String stampToXml(Stamp stamp)
Parameters:
stamp - the stamp to represents in XML
Returns:
an XML representation of the given stamp
Since:
jcms-4.1

getXmlHeader

public String getXmlHeader()
Returns:
the XML header of JSync messages
Since:
jcms-4.1

getXmlFooter

public String getXmlFooter()
Returns:
the XML footer of JSync messages
Since:
jcms-4.1

parse

public static Message parse(String xml)
                     throws org.jdom.JDOMException,
                            IOException
Parse the given XML strings and builds the corresponding JSync message

Parameters:
xml - the XML to parse
Returns:
a sub-class of Message or null if the message parsing has failed.
Throws:
org.jdom.JDOMException
IOException
Since:
jcms-4.1


Copyright © 2001-2007 Jalios SA. All Rights Reserved.