org.jabber.jabberbeans.Extension
Class Roster
java.lang.Object
|
+--org.jabber.jabberbeans.XMLData
|
+--org.jabber.jabberbeans.Extension.Roster
- All Implemented Interfaces:
- Extension, MessageExtension, QueryExtension, java.io.Serializable
- Direct Known Subclasses:
- RosterExtension
- public class Roster
- extends XMLData
- implements QueryExtension, MessageExtension
A Roster
holds the values that would be stored in
a jabber:iq:roster or a jabber:x:roster namespace. It is a list of users
a jabber:iq:roster object is requested from the server to get the active
user's contact list, sent to the server to modify the contact list, and
also received from the server ('pushed') when the contact list changes,
by any active resource of the active user.
a jabber:x:roster object is sent in messages, to give another user certain
contacts in a processable form, so that a specific UI can be shown
(and the user doesn't have to enter all these resources by hand)
- See Also:
- Serialized Form
Method Summary |
void |
appendItem(java.lang.StringBuffer retval)
appendItem converts this packet to XML, then appends
it to a StringBuffer |
boolean |
isIQRoster()
isIQRoster returns true if this is a jabber:iq:roster,
false if it is a jabber:x:roster. |
java.util.Enumeration |
items()
items returns an Enumeration which can be
used to step through all the available jabber roster items. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Roster
public Roster(RosterBuilder builder)
throws java.lang.InstantiationException
- Creates a new
Roster
instance.
- Parameters:
builder
- an RosterBuilder
value
items
public java.util.Enumeration items()
items
returns an Enumeration which can be
used to step through all the available jabber roster items.
- Returns:
- an
Enumeration
, or null if no items present
isIQRoster
public boolean isIQRoster()
isIQRoster
returns true if this is a jabber:iq:roster,
false if it is a jabber:x:roster.
- Returns:
- a
boolean
value
appendItem
public void appendItem(java.lang.StringBuffer retval)
appendItem
converts this packet to XML, then appends
it to a StringBuffer
- Specified by:
appendItem
in interface Extension
- Specified by:
appendItem
in class XMLData
- Parameters:
retval
- a StringBuffer
to append to.