Package | org.igniterealtime.xiff.data |
Class | public class Presence |
Inheritance | Presence ![]() ![]() ![]() |
Implements | IPresence |
Property | Defined by | ||
---|---|---|---|
![]() | errorCode : int
The error code, assuming this stanza contains error information.
| XMPPStanza | |
![]() | errorCondition : String
The error condition, assuming this stanza contains error information.
| XMPPStanza | |
![]() | errorMessage : String
The error message, assuming this stanza contains error information.
| XMPPStanza | |
![]() | errorType : String
The error type, assuming this stanza contains error information.
| XMPPStanza | |
![]() | _exts : Object | ExtensionContainer | |
![]() | from : EscapedJID
The JID of the sender.
| XMPPStanza | |
![]() | id : String
The unique identifier of this stanza.
| XMPPStanza | |
![]() | idGenerator : IIDGenerator
[static]
The ID generator for this stanza type.
| XMPPStanza | |
priority : int
The priority of the presence, usually on a scale of 1-5.
| Presence | ||
show : String
The show value; away, online, etc.
| Presence | ||
status : String
The status; usually used for "away messages."
| Presence | ||
![]() | to : EscapedJID
The JID of the recipient.
| XMPPStanza | |
![]() | type : String
The stanza type.
| XMPPStanza | |
![]() | XMLData : XML [static]
| XMLStanza | |
![]() | XMLFactory : XMLDocument [static]
| XMLStanza |
Method | Defined by | ||
---|---|---|---|
Presence(recipient:EscapedJID = null, sender:EscapedJID = null, presenceType:String = null, showVal:String = null, statusVal:String = null, priorityVal:int = 0)
| Presence | ||
![]() | ExtensionContainer | ||
![]() |
addTextNode(parent:XMLNode, elementName:String, value:String):XMLNode
Adds a simple text node to the parent node specified.
| XMLStanza | |
deserialize(xmlNode:XMLNode):Boolean
Deserializes an XML object and populates the Presence instance with its data.
| Presence | ||
![]() |
ensureNode(node:XMLNode, elementName:String):XMLNode
Ensures that a node with a specific element name exists in the stanza.
| XMLStanza | |
![]() |
exists(value:*):Boolean
[static]
A helper method to determine if a value is both not null
and not undefined.
| XMLStanza | |
![]() |
generateID(prefix:String = null):String
[static]
Generates a unique ID for the stanza.
| XMPPStanza | |
![]() |
getAllExtensions():Array
| ExtensionContainer | |
![]() |
getAllExtensionsByNS(ns:String):Array
| ExtensionContainer | |
![]() |
getExtension(name:String):Extension
| ExtensionContainer | |
![]() |
getNode():XMLNode
| XMLStanza | |
![]() |
removeAllExtensions(ns:String):void
| ExtensionContainer | |
![]() |
removeExtension(ext:IExtension):Boolean
| ExtensionContainer | |
![]() |
replaceTextNode(parent:XMLNode, original:XMLNode, elementName:String, value:String):XMLNode
Replaces one node in the stanza with another simple text node.
| XMLStanza | |
serialize(parentNode:XMLNode):Boolean
Serializes the Presence into XML form for sending to a server.
| Presence | ||
![]() |
setNode(node:XMLNode):Boolean
Sets the XML node that should be used for this stanza's internal XML representation.
| XMLStanza |
Constant | Defined by | ||
---|---|---|---|
![]() | CLIENT_NAMESPACE : String = "jabber:client" [static]
| XMPPStanza | |
![]() | CLIENT_VERSION : String = "1.0" [static]
The version of XMPP specified in RFC 3920 is "1.0"; in particular, this
encapsulates the stream-related protocols (Use of TLS (Section 5),
Use of SASL (Section 6), and Stream Errors (Section 4.7)), as well as
the semantics of the three defined XML stanza types (
| XMPPStanza | |
![]() | NAMESPACE_FLASH : String = "http://www.jabber.com/streams/flash" [static]
| XMPPStanza | |
![]() | NAMESPACE_STREAM : String = "http://etherx.jabber.org/streams" [static]
| XMPPStanza | |
SHOW_AWAY : String = "away" [static]
The entity or resource is temporarily away.
| Presence | ||
SHOW_CHAT : String = "chat" [static]
The entity or resource is actively interested in chatting.
| Presence | ||
SHOW_DND : String = "dnd" [static]
The entity or resource is busy (dnd = "Do Not Disturb").
| Presence | ||
SHOW_XA : String = "xa" [static]
The entity or resource is away for an extended period (xa = "eXtended Away").
| Presence | ||
TYPE_ERROR : String = "error" [static]
An error has occurred regarding processing of a
previously-sent presence stanza; if the presence stanza is of type
"error", it MUST include an error child element.
| Presence | ||
TYPE_PROBE : String = "probe" [static]
A request for an entity's current presence; SHOULD be
generated only by a server on behalf of a user.
| Presence | ||
TYPE_SUBSCRIBE : String = "subscribe" [static]
The sender wishes to subscribe to the recipient's
presence.
| Presence | ||
TYPE_SUBSCRIBED : String = "subscribed" [static]
The sender has allowed the recipient to receive their presence.
| Presence | ||
TYPE_UNAVAILABLE : String = "unavailable" [static]
Signals that the entity is no longer available for communication.
| Presence | ||
TYPE_UNSUBSCRIBE : String = "unsubscribe" [static]
The sender is unsubscribing from the receiver's presence.
| Presence | ||
TYPE_UNSUBSCRIBED : String = "unsubscribed" [static]
The subscription request has been denied or a
previously-granted subscription has been cancelled.
| Presence | ||
![]() | XML_LANG : String = "en" [static]
| XMPPStanza |
priority | property |
priority:int
[read-write]The priority of the presence, usually on a scale of 1-5. RFC: "The value MUST be an integer between -128 and +127"
Implementation public function get priority():int
public function set priority(value:int):void
show | property |
show:String
[read-write]The show value; away, online, etc. There are predefined static variables in the Presence class for this:
public function get show():String
public function set show(value:String):void
status | property |
status:String
[read-write]The status; usually used for "away messages."
Implementation public function get status():String
public function set status(value:String):void
Presence | () | constructor |
public function Presence(recipient:EscapedJID = null, sender:EscapedJID = null, presenceType:String = null, showVal:String = null, statusVal:String = null, priorityVal:int = 0)
Parameters
recipient:EscapedJID (default = null ) — The recipient of the presence, usually in the form of a JID.
|
|
sender:EscapedJID (default = null ) — The sender of the presence, usually in the form of a JID.
|
|
presenceType:String (default = null ) — The type of presence as a string. There are predefined static variables for
|
|
showVal:String (default = null ) — What to show for this presence (away, online, etc.) There are predefined static variables for
|
|
statusVal:String (default = null ) — The status; usually used for the "away message."
|
|
priorityVal:int (default = 0 ) — The priority of this presence; usually on a scale of 1-5.
|
deserialize | () | method |
public override function deserialize(xmlNode:XMLNode):Boolean
Deserializes an XML object and populates the Presence instance with its data.
ParametersxmlNode:XMLNode — The XML to deserialize
|
Boolean — An indication as to whether deserialization was sucessful
|
serialize | () | method |
public override function serialize(parentNode:XMLNode):Boolean
Serializes the Presence into XML form for sending to a server.
ParametersparentNode:XMLNode |
Boolean — An indication as to whether serialization was successful
|
SHOW_AWAY | constant |
public static const SHOW_AWAY:String = "away"
The entity or resource is temporarily away.
SHOW_CHAT | constant |
public static const SHOW_CHAT:String = "chat"
The entity or resource is actively interested in chatting.
SHOW_DND | constant |
public static const SHOW_DND:String = "dnd"
The entity or resource is busy (dnd = "Do Not Disturb").
SHOW_XA | constant |
public static const SHOW_XA:String = "xa"
The entity or resource is away for an extended period (xa = "eXtended Away").
TYPE_ERROR | constant |
public static const TYPE_ERROR:String = "error"
An error has occurred regarding processing of a previously-sent presence stanza; if the presence stanza is of type "error", it MUST include an error child element.
TYPE_PROBE | constant |
public static const TYPE_PROBE:String = "probe"
A request for an entity's current presence; SHOULD be generated only by a server on behalf of a user.
TYPE_SUBSCRIBE | constant |
public static const TYPE_SUBSCRIBE:String = "subscribe"
The sender wishes to subscribe to the recipient's presence.
TYPE_SUBSCRIBED | constant |
public static const TYPE_SUBSCRIBED:String = "subscribed"
The sender has allowed the recipient to receive their presence.
TYPE_UNAVAILABLE | constant |
public static const TYPE_UNAVAILABLE:String = "unavailable"
Signals that the entity is no longer available for communication.
TYPE_UNSUBSCRIBE | constant |
public static const TYPE_UNSUBSCRIBE:String = "unsubscribe"
The sender is unsubscribing from the receiver's presence.
TYPE_UNSUBSCRIBED | constant |
public static const TYPE_UNSUBSCRIBED:String = "unsubscribed"
The subscription request has been denied or a previously-granted subscription has been cancelled.