com.jalios.jstore.jsync
Class Message
java.lang.Object
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: 27753 $
- Author:
- Olivier Dedieu
Constructor Summary |
Message(org.jdom.Element root)
Constructs a new Message from an XML element |
Message(String urid)
Constructs a new Message |
REVISION
public static final String REVISION
- See Also:
- Constant Field Values
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
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-2010 Jalios SA. All Rights Reserved.