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
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
NAMESPACE
-
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(java.util.List<Jid> jids)
Block contacts.java.util.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(java.util.List<Jid> jids)
Unblock contacts.-
Methods inherited from class org.jivesoftware.smack.Manager
connection, getAuthenticatedConnectionOrThrow, schedule, schedule, scheduleBlocking
-
-
-
-
Field Detail
-
NAMESPACE
public static final java.lang.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, java.lang.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.java.lang.InterruptedException
- if the calling thread was interrupted.
-
getBlockList
public java.util.List<Jid> getBlockList() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.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.java.lang.InterruptedException
- if the calling thread was interrupted.
-
blockContacts
public void blockContacts(java.util.List<Jid> jids) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.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.java.lang.InterruptedException
- if the calling thread was interrupted.
-
unblockContacts
public void unblockContacts(java.util.List<Jid> jids) throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.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.java.lang.InterruptedException
- if the calling thread was interrupted.
-
unblockAll
public void unblockAll() throws SmackException.NoResponseException, XMPPException.XMPPErrorException, SmackException.NotConnectedException, java.lang.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.java.lang.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)
-
-