public final class ContactExchangeManager extends ExtensionManager
| Modifier and Type | Method and Description |
|---|---|
void |
addContactExchangeListener(ContactExchangeListener contactExchangeListener)
Adds a contact exchange listener.
|
ContactExchange.Item.Action |
approve(ContactExchange.Item item)
Approves a roster exchange item by modifying the roster accordingly.
|
Collection<Jid> |
getTrustedEntities()
Gets a collection of trusted entities for which roster item exchange suggestions are approved automatically (no listeners will be called).
|
void |
removeContactExchangeListener(ContactExchangeListener contactExchangeListener)
Removes a previously added contact exchange listener.
|
void |
suggestContactAddition(Jid jid,
Contact... contacts)
Suggests the addition of one or more contacts to another user.
|
isEnabled, setEnabledpublic Collection<Jid> getTrustedEntities()
public void suggestContactAddition(Jid jid, Contact... contacts) throws XmppException
jid - The recipient.contacts - The contactsStanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic ContactExchange.Item.Action approve(ContactExchange.Item item) throws XmppException
If the item is to be added and does not yet exist, it will be added to your roster and you are subscribed to its presence.
If it already exists in your roster but in a different group than suggested, it will additionally be added to the suggested group.
If the item is to be deleted, it will be deleted from your roster, if the suggested group(s) matches the same group(s) in your roster.
Otherwise it will be edited, so that it no longer belongs to the suggested groups.
If the item is to be modified, it will be modified accordingly, if it exists.
item - The roster exchange item.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic void addContactExchangeListener(ContactExchangeListener contactExchangeListener)
contactExchangeListener - The listener.removeContactExchangeListener(ContactExchangeListener)public void removeContactExchangeListener(ContactExchangeListener contactExchangeListener)
contactExchangeListener - The listener.addContactExchangeListener(ContactExchangeListener)Copyright © 2014–2015 XMPP.rocks. All rights reserved.