public class RosterExchangeManager extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
ELEMENT |
static String |
NAMESPACE |
| Constructor and Description |
|---|
RosterExchangeManager(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(XMPPConnection connection) |
void |
removeRosterListener(RosterExchangeListener rosterExchangeListener)
Removes a listener from roster exchanges.
|
void |
send(RosterEntry rosterEntry,
String targetUserID)
Sends a roster entry to userID.
|
void |
send(RosterGroup rosterGroup,
String targetUserID)
Sends a roster group to userID.
|
void |
send(Roster roster,
String targetUserID)
Sends a roster to userID.
|
public static final String NAMESPACE
public static final String ELEMENT
public RosterExchangeManager(XMPPConnection connection)
connection - an XMPPConnection which is used to send and receive messages.public static RosterExchangeManager getInstanceFor(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(Roster roster, String targetUserID) throws SmackException.NotConnectedException
roster - the roster to sendtargetUserID - the user that will receive the roster entriesSmackException.NotConnectedExceptionpublic void send(RosterEntry rosterEntry, String targetUserID) throws SmackException.NotConnectedException
rosterEntry - the roster entry to sendtargetUserID - the user that will receive the roster entriesSmackException.NotConnectedExceptionpublic void send(RosterGroup rosterGroup, String targetUserID) throws SmackException.NotConnectedException
rosterGroup - the roster group to sendtargetUserID - the user that will receive the roster entriesSmackException.NotConnectedException