public final class PrivacyListManager extends Manager
Server-side privacy lists enable successful completion of the following use cases:
- Retrieving one's privacy lists.
- Adding, removing, and editing one's privacy lists.
- Setting, changing, or declining active lists.
- Setting, changing, or declining the default list (i.e., the list that is active by default).
- Allowing or blocking messages based on JID, group, or subscription type (or globally).
- Allowing or blocking inbound presence notifications based on JID, group, or subscription type (or globally).
- Allowing or blocking outbound presence notifications based on JID, group, or subscription type (or globally).
- Allowing or blocking IQ stanzas based on JID, group, or subscription type (or globally).
- Allowing or blocking all communications based on JID, group, or subscription type (or globally).
| Modifier and Type | Method and Description |
|---|---|
void |
addPrivacyListListener(Consumer<PrivacyListEvent> privacyListListener)
Adds a privacy list listener.
|
AsyncResult<IQ> |
createOrUpdateList(PrivacyList privacyList)
Creates or edits a privacy list.
|
AsyncResult<IQ> |
declineActiveList()
Declines the use of any active list.
|
AsyncResult<IQ> |
declineDefaultList()
Declines the use of any default list.
|
AsyncResult<PrivacyList> |
getPrivacyList(String name)
Gets a privacy list.
|
AsyncResult<Collection<PrivacyList>> |
getPrivacyLists()
Gets the privacy lists.
|
AsyncResult<IQ> |
removeList(String name)
Removes a privacy list.
|
void |
removePrivacyListListener(Consumer<PrivacyListEvent> privacyListListener)
Removes a previously added privacy list listener.
|
AsyncResult<IQ> |
setActiveList(String name)
Changes the active list currently being applied.
|
AsyncResult<IQ> |
setDefaultList(String name)
Change the default list (which applies to the user as a whole, not only the sending resource).
|
isEnabled, setEnabledpublic void addPrivacyListListener(Consumer<PrivacyListEvent> privacyListListener)
privacyListListener - The listener.removePrivacyListListener(Consumer)public void removePrivacyListListener(Consumer<PrivacyListEvent> privacyListListener)
privacyListListener - The listener.addPrivacyListListener(Consumer)public AsyncResult<Collection<PrivacyList>> getPrivacyLists()
public AsyncResult<PrivacyList> getPrivacyList(String name)
name - The privacy list name.public AsyncResult<IQ> setActiveList(String name)
name - The active list name.public AsyncResult<IQ> declineActiveList()
public AsyncResult<IQ> setDefaultList(String name)
name - The list name.public AsyncResult<IQ> declineDefaultList()
public AsyncResult<IQ> createOrUpdateList(PrivacyList privacyList)
privacyList - The privacy list.public AsyncResult<IQ> removeList(String name)
name - The privacy list.Copyright © 2014–2017 XMPP.rocks. All rights reserved.