public final class ContactExchangeManager extends Manager
| Modifier and Type | Method and Description |
|---|---|
void |
addContactExchangeListener(Consumer<ContactExchangeEvent> contactExchangeListener)
Adds a contact exchange listener.
|
ContactExchange.Item.Action |
approve(ContactExchange.Item item)
Approves a roster exchange item by modifying the roster accordingly.
|
Collection<rocks.xmpp.addr.Jid> |
getTrustedEntities()
Gets a collection of trusted entities for which roster item exchange suggestions are approved automatically (no listeners will be called).
|
void |
removeContactExchangeListener(Consumer<ContactExchangeEvent> contactExchangeListener)
Removes a previously added contact exchange listener.
|
AsyncResult<Void> |
suggestContactAddition(rocks.xmpp.addr.Jid jid,
Contact... contacts)
Suggests the addition of one or more contacts to another user.
|
isEnabled, setEnabledpublic final Collection<rocks.xmpp.addr.Jid> getTrustedEntities()
public AsyncResult<Void> suggestContactAddition(rocks.xmpp.addr.Jid jid, Contact... contacts)
jid - The recipient.contacts - The contacts.public ContactExchange.Item.Action approve(ContactExchange.Item item)
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.public void addContactExchangeListener(Consumer<ContactExchangeEvent> contactExchangeListener)
contactExchangeListener - The listener.removeContactExchangeListener(Consumer)public void removeContactExchangeListener(Consumer<ContactExchangeEvent> contactExchangeListener)
contactExchangeListener - The listener.addContactExchangeListener(Consumer)Copyright © 2014–2016 XMPP.rocks. All rights reserved.