org.jabber.jabberbeans
Class Presence
java.lang.Object
|
+--org.jabber.jabberbeans.XMLData
|
+--org.jabber.jabberbeans.ContentPacket
|
+--org.jabber.jabberbeans.Presence
- All Implemented Interfaces:
- Extension, Packet, java.io.Serializable
- public final class Presence
- extends ContentPacket
- implements java.io.Serializable
This class is an abstraction of presence packets - both incoming and
outgoing.
Incoming presence packets are notifications on a resource - they are
sent by the remote client's server when that client has a status change.
Outgoing presence packets are of two types. You send out your presence by
sending a packet to the server with your new status. The second type is a
subscribe request, where you request a remote user add you to their
presence notifications.
- See Also:
- Serialized Form
Method Summary |
void |
appendItem(java.lang.StringBuffer retval)
appendItem appends the XML representation of the
current packet data to the specified StringBuffer . |
int |
getPriority()
getPriority returns the priority level being set |
java.lang.String |
getStateShow()
getStateShow returns the State of a user |
java.lang.String |
getStatus()
getStatus returns the status value, if any |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jabber.jabberbeans.Packet |
toString |
Presence
public Presence(PresenceBuilder builder)
throws java.lang.InstantiationException
- Creates a new
Presence
instance.
- Parameters:
builder
- a PresenceBuilder
to get parameters from
- Throws:
java.lang.InstantiationException
- if there is not enough data to create
a valid packet.
getStatus
public final java.lang.String getStatus()
getStatus
returns the status value, if any
- Returns:
- a
String
value of status, or null if none
getPriority
public final int getPriority()
getPriority
returns the priority level being set
- Returns:
- an
int
value
getStateShow
public final java.lang.String getStateShow()
getStateShow
returns the State of a user
- Returns:
- a
String
value showing state
appendItem
public final void appendItem(java.lang.StringBuffer retval)
appendItem
appends the XML representation of the
current packet data to the specified StringBuffer
.
- Specified by:
appendItem
in interface Packet
- Specified by:
appendItem
in class XMLData
- Parameters:
retval
- The StringBuffer
to append to