public final class BlockingManager extends ExtensionManager
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(BlockingListener blockingListener)
Adds a blocking listener, which allows to listen for block and unblock pushes.
|
void |
blockContact(Jid... jids)
Blocks communications with contacts.
|
Collection<Jid> |
getBlockedContacts()
Retrieves the blocked contacts.
|
void |
removeBlockingListener(BlockingListener blockingListener)
Removes a previously added blocking listener.
|
void |
unblockContact(Jid... jids)
Unblocks communications with specific contacts or with all contacts.
|
isEnabled, setEnabledpublic final void addBlockingListener(BlockingListener blockingListener)
blockingListener - The listener.removeBlockingListener(BlockingListener)public final void removeBlockingListener(BlockingListener blockingListener)
blockingListener - The listener.addBlockingListener(BlockingListener)public final Collection<Jid> getBlockedContacts() throws XmppException
StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.XmppExceptionpublic final void blockContact(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(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.