public class RosterExchangeManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ELEMENT |
static java.lang.String |
NAMESPACE |
Constructor and Description |
---|
RosterExchangeManager(org.jivesoftware.smack.XMPPConnection connection)
Creates a new roster exchange manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addRosterListener(RosterExchangeListener rosterExchangeListener)
Adds a listener to roster exchanges.
|
static RosterExchangeManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
void |
removeRosterListener(RosterExchangeListener rosterExchangeListener)
Removes a listener from roster exchanges.
|
void |
send(org.jivesoftware.smack.roster.RosterEntry rosterEntry,
org.jxmpp.jid.Jid targetUserID)
Sends a roster entry to userID.
|
void |
send(org.jivesoftware.smack.roster.RosterGroup rosterGroup,
org.jxmpp.jid.Jid targetUserID)
Sends a roster group to userID.
|
void |
send(org.jivesoftware.smack.roster.Roster roster,
org.jxmpp.jid.Jid targetUserID)
Sends a roster to userID.
|
public static final java.lang.String NAMESPACE
public static final java.lang.String ELEMENT
public RosterExchangeManager(org.jivesoftware.smack.XMPPConnection connection)
connection
- an XMPPConnection which is used to send and receive messages.public static RosterExchangeManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public void addRosterListener(RosterExchangeListener rosterExchangeListener)
rosterExchangeListener
- a roster exchange listener.public void removeRosterListener(RosterExchangeListener rosterExchangeListener)
rosterExchangeListener
- a roster exchange listener..public void send(org.jivesoftware.smack.roster.Roster roster, org.jxmpp.jid.Jid targetUserID) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
roster
- the roster to sendtargetUserID
- the user that will receive the roster entriesorg.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.public void send(org.jivesoftware.smack.roster.RosterEntry rosterEntry, org.jxmpp.jid.Jid targetUserID) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
rosterEntry
- the roster entry to sendtargetUserID
- the user that will receive the roster entriesorg.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.public void send(org.jivesoftware.smack.roster.RosterGroup rosterGroup, org.jxmpp.jid.Jid targetUserID) throws org.jivesoftware.smack.SmackException.NotConnectedException, java.lang.InterruptedException
rosterGroup
- the roster group to sendtargetUserID
- the user that will receive the roster entriesorg.jivesoftware.smack.SmackException.NotConnectedException
- if the XMPP connection is not connected.java.lang.InterruptedException
- if the calling thread was interrupted.