org.jivesoftware.xiff.data
class Presence
Object
|
+--org.jivesoftware.xiff.data.XMLStanza
|
+--org.jivesoftware.xiff.data.XMPPStanza
|
+--org.jivesoftware.xiff.data.Presence
Implemented Interfaces: ISerializableclass Presence extends XMPPStanza
This class provides encapsulation for manipulation of presence data for sending and receiving.
- Author:Sean Voisen
- Since:2.0.0
Fields inherited from class org.jivesoftware.xiff.data.XMPPStanza
Fields inherited from class org.jivesoftware.xiff.data.XMLStanza
Property Summary
The priority of the presence, usually on a scale of 1-5.
The show value; away, online, etc. There are predefined static variables in the Presence class for this:
- Presence.SHOW_AWAY
- Presence.SHOW_CHAT
- Presence.SHOW_DND
- Presence.SHOW_NORMAL
- Presence.SHOW_XA
The status; usually used for "away messages."
Properties inherited from class org.jivesoftware.xiff.data.XMPPStanza
Constructor
public Presence (
recipient: String, sender: String, presenceType: String, showVal: String, statusVal: String, priorityVal: Number)
Method Summary
Deserializes an XML object and populates the Presence instance with its data.
Serializes the Presence into XML form for sending to a server.
Methods inherited from class org.jivesoftware.xiff.data.XMPPStanza
Methods inherited from class org.jivesoftware.xiff.data.XMLStanza
Field Documentation
Property Documentation
priority
public priority: Number (read, write)
The priority of the presence, usually on a scale of 1-5.
show
public show: String (read, write)
The show value; away, online, etc. There are predefined static variables in the Presence class for this:
- Presence.SHOW_AWAY
- Presence.SHOW_CHAT
- Presence.SHOW_DND
- Presence.SHOW_NORMAL
- Presence.SHOW_XA
Constructor Documentation
Presence
public function Presence (
recipient: String,
sender: String,
presenceType: String,
showVal: String,
statusVal: String,
priorityVal: Number)
sender: String,
presenceType: String,
showVal: String,
statusVal: String,
priorityVal: Number)
Method Documentation
deserialize
public function deserialize (
xmlNode: XMLNode): Boolean
Deserializes an XML object and populates the Presence instance with its data.
- Specified by:deserialize in interface ISerializable
- Overrides:XMPPStanza.deserialize in class XMPPStanza
- Parameters:
xmlNode The XML to deserialize - Returns:An indication as to whether deserialization was sucessful
serialize
public function serialize (
parentNode: XMLNode): Boolean
Serializes the Presence into XML form for sending to a server.
- Specified by:serialize in interface ISerializable
- Overrides:XMPPStanza.serialize in class XMPPStanza
- Parameters:
parentNode (XMLNode) The container of the XML. - Returns:An indication as to whether serialization was successful
- Presence.as, Last Modified: 3/10/2005 10:16:32 PM