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.
|
java.lang.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.
|
java.util.Collection<RosterPacket.Item> |
getRosterItems()
Returns an unmodifiable collection for the roster items in the packet.
|
java.lang.String |
getVersion() |
void |
setVersion(java.lang.String version) |
createErrorResponse, createResultIQ, getType, setType, toXML
addCommonAttributes, addExtension, addExtensions, equals, getDefaultLanguage, getError, getExtension, getExtension, getExtensions, getExtensionsXML, getFrom, getPacketID, getTo, getXmlns, hashCode, nextID, removeExtension, setDefaultXmlns, setError, setFrom, setPacketID, setTo, toString
public void addRosterItem(RosterPacket.Item item)
item
- a roster item.public int getRosterItemCount()
public java.util.Collection<RosterPacket.Item> getRosterItems()
public java.lang.CharSequence getChildElementXML()
IQ
Extensions of this class must override this method.
getChildElementXML
in class IQ
public java.lang.String getVersion()
public void setVersion(java.lang.String version)