public final class ChatManager
extends org.jivesoftware.smack.Manager
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.
Modifier and Type | Method and Description |
---|---|
boolean |
addIncomingListener(IncomingChatMessageListener listener)
Add a new listener for incoming chat messages.
|
boolean |
addListener(IncomingChatMessageListener listener)
Deprecated.
|
boolean |
addListener(OutgoingChatMessageListener listener)
Deprecated.
use
addOutgoingListener(OutgoingChatMessageListener) instead. |
boolean |
addOutgoingListener(OutgoingChatMessageListener listener)
Add a new listener for outgoing chat messages.
|
Chat |
chatWith(org.jxmpp.jid.EntityBareJid jid)
Start a new or retrieve the existing chat with
jid . |
static ChatManager |
getInstanceFor(org.jivesoftware.smack.XMPPConnection connection) |
boolean |
removeIncomingListener(IncomingChatMessageListener listener)
Remove an incoming chat message listener.
|
boolean |
removeListener(IncomingChatMessageListener listener)
Deprecated.
Use
removeIncomingListener(IncomingChatMessageListener) instead. |
boolean |
removeListener(OutgoingChatMessageListener listener)
Deprecated.
use
removeOutgoingListener(OutgoingChatMessageListener) instead. |
boolean |
removeOutgoingListener(OutgoingChatMessageListener listener)
Remove an outgoing chat message listener.
|
void |
setXhmtlImEnabled(boolean xhtmlIm)
Also notify about messages containing XHTML-IM.
|
public static ChatManager getInstanceFor(org.jivesoftware.smack.XMPPConnection connection)
public boolean addIncomingListener(IncomingChatMessageListener listener)
listener
- the listener to add.true
if the listener was not already added.@Deprecated public boolean addListener(IncomingChatMessageListener listener)
listener
- the listener to add.true
if the listener was not already added.@Deprecated public boolean removeListener(IncomingChatMessageListener listener)
removeIncomingListener(IncomingChatMessageListener)
instead.listener
- the listener to remove.true
if the listener was active and got removed.public boolean removeIncomingListener(IncomingChatMessageListener listener)
listener
- the listener to remove.true
if the listener was active and got removed.public boolean addOutgoingListener(OutgoingChatMessageListener listener)
listener
- the listener to add.true
if the listener was not already added.@Deprecated public boolean addListener(OutgoingChatMessageListener listener)
addOutgoingListener(OutgoingChatMessageListener)
instead.listener
- the listener to add.true
if the listener was not already added.@Deprecated public boolean removeListener(OutgoingChatMessageListener listener)
removeOutgoingListener(OutgoingChatMessageListener)
instead.listener
- the listener to remove.true
if the listener was active and got removed.public boolean removeOutgoingListener(OutgoingChatMessageListener listener)
listener
- the listener to remove.true
if the listener was active and got removed.public Chat chatWith(org.jxmpp.jid.EntityBareJid jid)
jid
.jid
- the XMPP address of the other entity to chat with.public void setXhmtlImEnabled(boolean xhtmlIm)
xhtmlIm
-