Package org.jivesoftware.smackx.blocking
Class BlockingCommandManager
- java.lang.Object
-
- org.jivesoftware.smack.Manager
-
- org.jivesoftware.smackx.blocking.BlockingCommandManager
-
public final class BlockingCommandManager extends Manager
Blocking command manager class.- See Also:
- XEP-0191: Blocking Command
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAllJidsUnblockedListener(AllJidsUnblockedListener allJidsUnblockedListener)
void
addJidsBlockedListener(JidsBlockedListener jidsBlockedListener)
void
addJidsUnblockedListener(JidsUnblockedListener jidsUnblockedListener)
void
blockContacts(List<Jid> jids)
Block contacts.List<Jid>
getBlockList()
Returns the block list.static BlockingCommandManager
getInstanceFor(XMPPConnection connection)
Get the singleton instance of BlockingCommandManager.boolean
isSupportedByServer()
Returns true if Blocking Command is supported by the server.void
removeAllJidsUnblockedListener(AllJidsUnblockedListener allJidsUnblockedListener)
void
removeJidsBlockedListener(JidsBlockedListener jidsBlockedListener)
void
removeJidsUnblockedListener(JidsUnblockedListener jidsUnblockedListener)
void
unblockAll()
Unblock all.void
unblockContacts(List<Jid> jids)
Unblock contacts.-
Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
-
-
-
Field Detail
-
NAMESPACE
public static final String NAMESPACE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstanceFor
public static BlockingCommandManager getInstanceFor(XMPPConnection connection)
Get the singleton instance of BlockingCommandManager.- Parameters:
connection
- TODO javadoc me please- Returns:
- the instance of BlockingCommandManager
-
isSupportedByServer
public boolean isSupportedByServer() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Returns true if Blocking Command is supported by the server.- Returns:
- true if Blocking Command is supported by the server.
- Throws:
SmackException.NoResponseException
- if there was no response from the remote entity.XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
getBlockList
public List<Jid> getBlockList() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Returns the block list.- Returns:
- the blocking list
- Throws:
SmackException.NoResponseException
- if there was no response from the remote entity.XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
blockContacts
public void blockContacts(List<Jid> jids) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Block contacts.- Parameters:
jids
- TODO javadoc me please- Throws:
SmackException.NoResponseException
- if there was no response from the remote entity.XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
unblockContacts
public void unblockContacts(List<Jid> jids) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Unblock contacts.- Parameters:
jids
- TODO javadoc me please- Throws:
SmackException.NoResponseException
- if there was no response from the remote entity.XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
unblockAll
public void unblockAll() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException
Unblock all.- Throws:
SmackException.NoResponseException
- if there was no response from the remote entity.XMPPException.XMPPErrorException
- if there was an XMPP error returned.SmackException.NotConnectedException
- if the XMPP connection is not connected.InterruptedException
- if the calling thread was interrupted.
-
addJidsBlockedListener
public void addJidsBlockedListener(JidsBlockedListener jidsBlockedListener)
-
removeJidsBlockedListener
public void removeJidsBlockedListener(JidsBlockedListener jidsBlockedListener)
-
addJidsUnblockedListener
public void addJidsUnblockedListener(JidsUnblockedListener jidsUnblockedListener)
-
removeJidsUnblockedListener
public void removeJidsUnblockedListener(JidsUnblockedListener jidsUnblockedListener)
-
addAllJidsUnblockedListener
public void addAllJidsUnblockedListener(AllJidsUnblockedListener allJidsUnblockedListener)
-
removeAllJidsUnblockedListener
public void removeAllJidsUnblockedListener(AllJidsUnblockedListener allJidsUnblockedListener)
-
-