public class RosterPacket extends IQ
| Modifier and Type | Class and Description |
|---|---|
static class |
RosterPacket.Item
A roster item, which consists of a JID, their name, the type of subscription, and
the groups the roster item belongs to.
|
static class |
RosterPacket.ItemStatus
The subscription status of a roster item.
|
static class |
RosterPacket.ItemType |
DEFAULT_LANGUAGE, ID_NOT_AVAILABLE| Constructor and Description |
|---|
RosterPacket() |
| Modifier and Type | Method and Description |
|---|---|
void |
addRosterItem(RosterPacket.Item item)
Adds a roster item to the packet.
|
CharSequence |
getChildElementXML()
Returns the sub-element XML section of the IQ packet, or null if there
isn't one.
|
int |
getRosterItemCount()
Returns the number of roster items in this roster packet.
|
Collection<RosterPacket.Item> |
getRosterItems()
Returns an unmodifiable collection for the roster items in the packet.
|
String |
getVersion() |
void |
setVersion(String version) |
createErrorResponse, createResultIQ, getType, setType, toXMLaddCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toStringpublic RosterPacket()
public void addRosterItem(RosterPacket.Item item)
item - a roster item.public int getRosterItemCount()
public Collection<RosterPacket.Item> getRosterItems()
public CharSequence getChildElementXML()
IQExtensions of this class must override this method.
getChildElementXML in class IQpublic String getVersion()
public void setVersion(String version)