org.jivesoftware.smack.chat2.ChatManager
from smack-extensions
instead.@Deprecated public final class ChatManager extends Manager
addChatListener(ChatManagerListener)
.Modifier and Type | Class and Description |
---|---|
static class |
ChatManager.MatchMode
Deprecated.
Defines the different modes under which a match will be attempted with an existing chat when
the incoming message does not have a thread id.
|
Modifier and Type | Method and Description |
---|---|
void |
addChatListener(ChatManagerListener listener)
Deprecated.
Register a new listener with the ChatManager to receive events related to chats.
|
void |
addOutgoingMessageInterceptor(MessageListener messageInterceptor)
Deprecated.
Adds an interceptor which intercepts any messages sent through chats.
|
void |
addOutgoingMessageInterceptor(MessageListener messageInterceptor,
StanzaFilter filter)
Deprecated.
|
Chat |
createChat(org.jxmpp.jid.EntityJid userJID)
Deprecated.
Creates a new chat and returns it.
|
Chat |
createChat(org.jxmpp.jid.EntityJid userJID,
ChatMessageListener listener)
Deprecated.
Creates a new chat and returns it.
|
Chat |
createChat(org.jxmpp.jid.EntityJid userJID,
String thread,
ChatMessageListener listener)
Deprecated.
Creates a new chat using the specified thread ID, then returns it.
|
Set<ChatManagerListener> |
getChatListeners()
Deprecated.
Returns an unmodifiable set of all chat listeners currently registered with this
manager.
|
static ChatManager |
getInstanceFor(XMPPConnection connection)
Deprecated.
Returns the ChatManager instance associated with a given XMPPConnection.
|
ChatManager.MatchMode |
getMatchMode()
Deprecated.
Gets the current mode for matching messages with NO thread id to existing chats.
|
Chat |
getThreadChat(String thread)
Deprecated.
|
boolean |
isNormalIncluded()
Deprecated.
Determines whether incoming messages of type normal will be used for creating new chats or matching
a message to existing ones.
|
void |
removeChatListener(ChatManagerListener listener)
Deprecated.
Removes a listener, it will no longer be notified of new events related to chats.
|
static void |
setDefaultIsNormalIncluded(boolean allowNormal)
Deprecated.
|
static void |
setDefaultMatchMode(ChatManager.MatchMode mode)
Deprecated.
|
void |
setMatchMode(ChatManager.MatchMode matchMode)
Deprecated.
Sets the mode for matching messages with NO thread id to existing chats.
|
void |
setNormalIncluded(boolean normalIncluded)
Deprecated.
Sets whether to allow incoming messages of type normal to be used for creating new chats or matching
a message to an existing one.
|
connection, getAuthenticatedConnectionOrThrow, schedule
public static ChatManager getInstanceFor(XMPPConnection connection)
connection
- the connection used to look for the proper ServiceDiscoveryManager.public boolean isNormalIncluded()
public void setNormalIncluded(boolean normalIncluded)
normalIncluded
- true to allow normal, false otherwise.public ChatManager.MatchMode getMatchMode()
public void setMatchMode(ChatManager.MatchMode matchMode)
matchMode
- The mode to set.public Chat createChat(org.jxmpp.jid.EntityJid userJID)
userJID
- the user this chat is with.public Chat createChat(org.jxmpp.jid.EntityJid userJID, ChatMessageListener listener)
userJID
- the user this chat is with.listener
- the optional listener which will listen for new messages from this chat.public Chat createChat(org.jxmpp.jid.EntityJid userJID, String thread, ChatMessageListener listener)
userJID
- the jid of the user this chat is withthread
- the thread of the created chat.listener
- the optional listener to add to the chatpublic Chat getThreadChat(String thread)
public void addChatListener(ChatManagerListener listener)
listener
- the listener.public void removeChatListener(ChatManagerListener listener)
listener
- the listener that is being removedpublic Set<ChatManagerListener> getChatListeners()
public void addOutgoingMessageInterceptor(MessageListener messageInterceptor)
messageInterceptor
- the interceptor.public void addOutgoingMessageInterceptor(MessageListener messageInterceptor, StanzaFilter filter)
public static void setDefaultMatchMode(ChatManager.MatchMode mode)
public static void setDefaultIsNormalIncluded(boolean allowNormal)