Class ListenerHandle

java.lang.Object
org.jivesoftware.smack.ListenerHandle
All Implemented Interfaces:
AutoCloseable

public abstract class ListenerHandle extends Object implements AutoCloseable
A handle of a listener, typically added to a connection. This handle implements AutoCloseable, allowing the the listener to be added using a try-with-resources statement.
  • Field Details

  • Method Details

    • removeListener

      public abstract boolean removeListener()
      Remove the handle's listener from the connection.
      Returns:
      true if the stanza listener was removed
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable