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,
Jid targetUserID)
Sends a roster entry to userID.
|
void |
send(RosterGroup rosterGroup,
Jid targetUserID)
Sends a roster group to userID.
|
void |
send(Roster roster,
Jid 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, Jid targetUserID) throws SmackException.NotConnectedException, InterruptedException
roster
- the roster to sendtargetUserID
- the user that will receive the roster entriesSmackException.NotConnectedException
InterruptedException
public void send(RosterEntry rosterEntry, Jid targetUserID) throws SmackException.NotConnectedException, InterruptedException
rosterEntry
- the roster entry to sendtargetUserID
- the user that will receive the roster entriesSmackException.NotConnectedException
InterruptedException
public void send(RosterGroup rosterGroup, Jid targetUserID) throws SmackException.NotConnectedException, InterruptedException
rosterGroup
- the roster group to sendtargetUserID
- the user that will receive the roster entriesSmackException.NotConnectedException
InterruptedException