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.
|
void |
blockContact(rocks.xmpp.addr.Jid... jids)
Blocks communications with contacts.
|
Collection<rocks.xmpp.addr.Jid> |
getBlockedContacts()
Retrieves the blocked contacts.
|
void |
removeBlockingListener(Consumer<BlockingEvent> blockingListener)
Removes a previously added blocking listener.
|
void |
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 Collection<rocks.xmpp.addr.Jid> getBlockedContacts() throws XmppException
StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic final void blockContact(rocks.xmpp.addr.Jid... jids)
throws XmppException
jids - The contacts.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic final void unblockContact(rocks.xmpp.addr.Jid... jids)
throws XmppException
jids - The contacts.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionCopyright © 2014–2015 XMPP.rocks. All rights reserved.