Package com.jalios.jstore.jsync
Class Message
java.lang.Object
com.jalios.jstore.jsync.Message
- Direct Known Subclasses:
AckMessage,CommitWorkMessage,DisjoinMessage,JoinMessage,SuggestJoinMessage,UpdateMessage
This abstract class is the super class of all JSync message classes
- Author:
- Olivier Dedieu
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
urid
-
time
protected long time
-
-
Constructor Details
-
Message
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 Details
-
getUrid
- Returns:
- the urid of the sender
- Since:
- jcms-4.1
-
toString
-
toXml
- Returns:
- an XML representation of this message
- Since:
- jcms-4.1
-
stampToXml
- Parameters:
stamp- the stamp to represents in XML- Returns:
- an XML representation of the given stamp
- Since:
- jcms-4.1
-
getXmlHeader
- Returns:
- the XML header of JSync messages
- Since:
- jcms-4.1
-
parse
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- if an error occursIOException- if an error occurs- Since:
- jcms-4.1
-
getTime
public long getTime()
-