public class ChatManager
extends java.lang.Object
addChatListener(ChatManagerListener)
.Modifier and Type | Method and Description |
---|---|
void |
addChatListener(ChatManagerListener listener)
Register a new listener with the ChatManager to recieve events related to chats.
|
void |
addOutgoingMessageInterceptor(PacketInterceptor packetInterceptor)
Adds an interceptor which intercepts any messages sent through chats.
|
void |
addOutgoingMessageInterceptor(PacketInterceptor packetInterceptor,
PacketFilter filter) |
Chat |
createChat(java.lang.String userJID,
MessageListener listener)
Creates a new chat and returns it.
|
Chat |
createChat(java.lang.String userJID,
java.lang.String thread,
MessageListener listener)
Creates a new chat using the specified thread ID, then returns it.
|
java.util.Collection<ChatManagerListener> |
getChatListeners()
Returns an unmodifiable collection of all chat listeners currently registered with this
manager.
|
Chat |
getThreadChat(java.lang.String thread) |
void |
removeChatListener(ChatManagerListener listener)
Removes a listener, it will no longer be notified of new events related to chats.
|
public Chat createChat(java.lang.String userJID, MessageListener listener)
userJID
- the user this chat is with.listener
- the listener which will listen for new messages from this chat.public Chat createChat(java.lang.String userJID, java.lang.String thread, MessageListener listener)
userJID
- the jid of the user this chat is withthread
- the thread of the created chat.listener
- the listener to add to the chatpublic Chat getThreadChat(java.lang.String thread)
public void addChatListener(ChatManagerListener listener)
listener
- the listener.public void removeChatListener(ChatManagerListener listener)
listener
- the listener that is being removedpublic java.util.Collection<ChatManagerListener> getChatListeners()
public void addOutgoingMessageInterceptor(PacketInterceptor packetInterceptor)
packetInterceptor
- the interceptor.public void addOutgoingMessageInterceptor(PacketInterceptor packetInterceptor, PacketFilter filter)
Copyright © 2003-2007 Jive Software.