Class BlockingCommandManager

java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smackx.blocking.BlockingCommandManager

public final class BlockingCommandManager extends org.jivesoftware.smack.Manager
Block communications with contacts and other entities using XEP-0191. Allows to
  • Check push notifications support
  • Get blocking list
  • Block contact
  • Unblock contact
  • Unblock all
See Also:
  • Field Details

  • Method Details

    • getInstanceFor

      public static BlockingCommandManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
      Get the singleton instance of BlockingCommandManager.
      Parameters:
      connection - TODO javadoc me please
      Returns:
      the instance of BlockingCommandManager
    • isSupportedByServer

      public boolean isSupportedByServer() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Returns true if Blocking Command is supported by the server.
      Returns:
      true if Blocking Command is supported by the server.
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • getBlockList

      public List<org.jxmpp.jid.Jid> getBlockList() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Returns the block list.
      Returns:
      the blocking list
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • blockContacts

      public void blockContacts(List<org.jxmpp.jid.Jid> jids) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Block contacts.
      Parameters:
      jids - TODO javadoc me please
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • unblockContacts

      public void unblockContacts(List<org.jxmpp.jid.Jid> jids) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Unblock contacts.
      Parameters:
      jids - TODO javadoc me please
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.SmackException.NotConnectedException - if the XMPP connection is not connected.
      InterruptedException - if the calling thread was interrupted.
    • unblockAll

      public void unblockAll() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException, InterruptedException
      Unblock all.
      Throws:
      org.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the remote entity.
      org.jivesoftware.smack.XMPPException.XMPPErrorException - if there was an XMPP error returned.
      org.jivesoftware.smack.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)