public final class BlockingManager extends Manager
Enabling or disabling this manager has no effect, because blocking is done on server side.
This class is thread-safe.| Modifier and Type | Method and Description |
|---|---|
void |
addBlockingListener(Consumer<BlockingEvent> blockingListener)
Adds a blocking listener, which allows to listen for block and unblock pushes.
|
AsyncResult<IQ> |
blockContact(rocks.xmpp.addr.Jid... jids)
Blocks communications with contacts.
|
AsyncResult<Set<rocks.xmpp.addr.Jid>> |
getBlockedContacts()
Retrieves the blocked contacts.
|
void |
removeBlockingListener(Consumer<BlockingEvent> blockingListener)
Removes a previously added blocking listener.
|
AsyncResult<IQ> |
unblockContact(rocks.xmpp.addr.Jid... jids)
Unblocks communications with specific contacts or with all contacts.
|
isEnabled, setEnabledpublic final void addBlockingListener(Consumer<BlockingEvent> blockingListener)
blockingListener - The listener.removeBlockingListener(Consumer)public final void removeBlockingListener(Consumer<BlockingEvent> blockingListener)
blockingListener - The listener.addBlockingListener(Consumer)public final AsyncResult<Set<rocks.xmpp.addr.Jid>> getBlockedContacts()
public final AsyncResult<IQ> blockContact(rocks.xmpp.addr.Jid... jids)
jids - The contacts.public final AsyncResult<IQ> unblockContact(rocks.xmpp.addr.Jid... jids)
jids - The contacts.Copyright © 2014–2017 XMPP.rocks. All rights reserved.