Class ChatManager

java.lang.Object
org.jivesoftware.smack.Manager
org.jivesoftware.smack.chat2.ChatManager

public final class ChatManager extends Manager
A chat manager for 1:1 XMPP instant messaging chats.

This manager and the according Chat API implement "Resource Locking" (XEP-0296). Support for Carbon Copies (XEP-0280) will be added once the XEP has progressed from experimental.

See Also:
  • Method Details

    • getInstanceFor

      public static ChatManager getInstanceFor(XMPPConnection connection)
    • addIncomingListener

      Add a new listener for incoming chat messages.
      Parameters:
      listener - the listener to add.
      Returns:
      true if the listener was not already added.
    • removeIncomingListener

      Remove an incoming chat message listener.
      Parameters:
      listener - the listener to remove.
      Returns:
      true if the listener was active and got removed.
    • addOutgoingListener

      Add a new listener for outgoing chat messages.
      Parameters:
      listener - the listener to add.
      Returns:
      true if the listener was not already added.
    • removeOutgoingListener

      Remove an outgoing chat message listener.
      Parameters:
      listener - the listener to remove.
      Returns:
      true if the listener was active and got removed.
    • chatWith

      public Chat chatWith(EntityBareJid jid)
      Start a new or retrieve the existing chat with jid.
      Parameters:
      jid - the XMPP address of the other entity to chat with.
      Returns:
      the Chat API for the given XMPP address.
    • setXhmtlImEnabled

      public void setXhmtlImEnabled(boolean xhtmlIm)
      Also notify about messages containing XHTML-IM.
      Parameters:
      xhtmlIm - TODO javadoc me please