| java.lang.Object org.xmpp.packet.Packet org.xmpp.packet.IQ org.xmpp.packet.Roster
Roster | public class Roster extends IQ (Code) | | Roster packet. The roster is a list of JIDs (typically other users) that
the user wishes to track the presence of. Each roster item is keyed by
JID and contains a nickname (optional), subscription type, and list of
groups (optional).
author: Matt Tucker |
Inner Class :public static class Item | |
Inner Class :public enum Subscription | |
Inner Class :public enum Ask | |
Constructor Summary | |
public | Roster() Constructs a new Roster with an automatically generated ID and a type
of
IQ.Type.get . | public | Roster(Type type) Constructs a new Roster using the specified type. | public | Roster(Type type, String ID) Constructs a new Roster using the specified type and ID. | public | Roster(Element element) Constructs a new Roster using an existing Element. |
Method Summary | |
public Item | addItem(String jid, Subscription subscription) Adds a new item to the roster. | public Item | addItem(JID jid, Subscription subscription) Adds a new item to the roster. | public Item | addItem(JID jid, String name, Ask ask, Subscription subscription, Collection<String> groups) Adds a new item to the roster. | public Roster | createCopy() Returns a deep copy of this Roster. | public Collection<Item> | getItems() Returns an unmodifiable copy of the
Item Items in the roster packet. | public void | removeItem(JID jid) Removes an item from this roster. |
Roster | public Roster()(Code) | | Constructs a new Roster with an automatically generated ID and a type
of
IQ.Type.get .
|
Roster | public Roster(Type type)(Code) | | Constructs a new Roster using the specified type. A packet ID will
be automatically generated.
Parameters: type - the IQ type. |
Roster | public Roster(Type type, String ID)(Code) | | Constructs a new Roster using the specified type and ID.
Parameters: type - the IQ type. Parameters: ID - the packet ID of the IQ. |
Roster | public Roster(Element element)(Code) | | Constructs a new Roster using an existing Element. This is useful
for parsing incoming roster Elements into Roster objects.
Parameters: element - the Roster Element. |
addItem | public Item addItem(String jid, Subscription subscription)(Code) | | Adds a new item to the roster. The name and groups are set to null
If the roster packet already contains an item using the same JID, the
information in the existing item will be overwritten with the new information.
The XMPP specification recommends that if the roster item is associated with another
instant messaging user (human), that the JID be in bare form (e.g. user@domain).
Use the
JID.toBareJID toBareJID() method for a bare JID.
Parameters: jid - the JID. Parameters: subscription - the subscription type. the newly created item. |
addItem | public Item addItem(JID jid, Subscription subscription)(Code) | | Adds a new item to the roster. The name and groups are set to null
If the roster packet already contains an item using the same JID, the
information in the existing item will be overwritten with the new information.
The XMPP specification recommends that if the roster item is associated with another
instant messaging user (human), that the JID be in bare form (e.g. user@domain).
Use the
JID.toBareJID toBareJID() method for a bare JID.
Parameters: jid - the JID. Parameters: subscription - the subscription type. the newly created item. |
addItem | public Item addItem(JID jid, String name, Ask ask, Subscription subscription, Collection<String> groups)(Code) | | Adds a new item to the roster. If the roster packet already contains an item
using the same JID, the information in the existing item will be overwritten
with the new information.
The XMPP specification recommends that if the roster item is associated with another
instant messaging user (human), that the JID be in bare form (e.g. user@domain).
Use the
JID.toBareJID toBareJID() method for a bare JID.
Parameters: jid - the JID. Parameters: name - the nickname. Parameters: ask - the ask type. Parameters: subscription - the subscription type. Parameters: groups - a Collection of groups. the newly created item. |
createCopy | public Roster createCopy()(Code) | | Returns a deep copy of this Roster.
a deep copy of this Roster. |
getItems | public Collection<Item> getItems()(Code) | | Returns an unmodifiable copy of the
Item Items in the roster packet.
an unmodifable copy of the Item Items in the roster packet. |
removeItem | public void removeItem(JID jid)(Code) | | Removes an item from this roster.
Parameters: jid - the JID of the item to remove. |
|
|