|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jivesoftware.spark.ChatManager
public class ChatManager
Handles the Chat Management of each individual Workspace
. The ChatManager is responsible
for creation and removal of chat rooms, transcripts, and transfers and room invitations.
Method Summary | |
---|---|
void |
activateChat(java.lang.String userJID,
java.lang.String nickname)
Activate a chat room with the selected user. |
void |
addChatRoomListener(ChatRoomListener listener)
Used to listen for rooms opening, closing or being activated( already opened, but tabbed to ) |
void |
addContactItemHandler(ContactItemHandler handler)
|
void |
addInvitationListener(RoomInvitationListener listener)
|
void |
addMessageFilter(MessageFilter filter)
Adds a new MessageFilter . |
void |
cancelledNotification(java.lang.String from,
java.lang.String packetID)
|
void |
composingNotification(java.lang.String from,
java.lang.String packetID)
|
ChatRoom |
createChatRoom(java.lang.String userJID,
java.lang.String nickname,
java.lang.String title)
Creates and/or opens a chat room with the specified user. |
ChatRoom |
createConferenceRoom(java.lang.String roomName,
java.lang.String serviceName)
Creates a new public Conference Room. |
void |
deliveredNotification(java.lang.String from,
java.lang.String packetID)
|
void |
displayedNotification(java.lang.String from,
java.lang.String packetID)
|
void |
filterIncomingMessage(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
|
void |
filterOutgoingMessage(ChatRoom room,
org.jivesoftware.smack.packet.Message message)
|
boolean |
fireContactItemDoubleClicked(ContactItem item)
|
boolean |
fireContactItemPresenceChanged(ContactItem item,
org.jivesoftware.smack.packet.Presence presence)
|
ChatContainer |
getChatContainer()
Returns all ChatRooms currently active. |
ChatRoom |
getChatRoom(java.lang.String jid)
Returns the ChatRoom for the giving jid. |
java.lang.String |
getDefaultConferenceService()
|
GroupChatRoom |
getGroupChat(java.lang.String roomName)
Returns the MultiUserChat associated with the specified roomname. |
javax.swing.Icon |
getIconForContactHandler(java.lang.String jid)
|
static ChatManager |
getInstance()
Returns the singleton instance of ChatManager ,
creating it if necessary. |
java.util.Collection |
getInvitationListeners()
|
java.util.Collection |
getMessageFilters()
Returns a Collection of MessageFilters registered to Spark. |
javax.swing.Icon |
getTabIconForContactHandler(org.jivesoftware.smack.packet.Presence presence)
|
void |
offlineNotification(java.lang.String from,
java.lang.String packetID)
|
void |
removeChat(ChatRoom chatRoom)
Removes the personal 1 to 1 chat from the ChatFrame. |
void |
removeChatRoomListener(ChatRoomListener listener)
Simplace facade for chatroom. |
void |
removeContactItemHandler(ContactItemHandler handler)
|
void |
removeInvitationListener(RoomInvitationListener listener)
|
void |
removeMessageFilter(MessageFilter filter)
Removes a MessageFilter . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ChatManager getInstance()
ChatManager
,
creating it if necessary.
ChatManager
public void addChatRoomListener(ChatRoomListener listener)
listener
- the ChatRoomListener to addpublic void removeChatRoomListener(ChatRoomListener listener)
listener
- the ChatRoomListener to removepublic void removeChat(ChatRoom chatRoom)
chatRoom
- the ChatRoom to remove.public ChatContainer getChatContainer()
public GroupChatRoom getGroupChat(java.lang.String roomName) throws ChatNotFoundException
roomName
- the name of the chat room.
ChatNotFoundException
public ChatRoom createChatRoom(java.lang.String userJID, java.lang.String nickname, java.lang.String title)
userJID
- the jid of the user to chat with.nickname
- the nickname to use for the user.public ChatRoom getChatRoom(java.lang.String jid)
ChatRoom
for the giving jid. If the ChatRoom is not found,
a new ChatRoom will be created.
jid
- the jid of the user to chat with.
public ChatRoom createConferenceRoom(java.lang.String roomName, java.lang.String serviceName)
roomName
- the name of the room.serviceName
- the service name to use (ex.conference.jivesoftware.com)
public void activateChat(java.lang.String userJID, java.lang.String nickname)
public void addMessageFilter(MessageFilter filter)
MessageFilter
.
filter
- the MessageFilter.public void removeMessageFilter(MessageFilter filter)
MessageFilter
.
filter
- the MessageFilter.public java.util.Collection getMessageFilters()
public void filterIncomingMessage(ChatRoom room, org.jivesoftware.smack.packet.Message message)
public void filterOutgoingMessage(ChatRoom room, org.jivesoftware.smack.packet.Message message)
public void addInvitationListener(RoomInvitationListener listener)
public void removeInvitationListener(RoomInvitationListener listener)
public java.util.Collection getInvitationListeners()
public java.lang.String getDefaultConferenceService()
public void addContactItemHandler(ContactItemHandler handler)
public void removeContactItemHandler(ContactItemHandler handler)
public boolean fireContactItemPresenceChanged(ContactItem item, org.jivesoftware.smack.packet.Presence presence)
public boolean fireContactItemDoubleClicked(ContactItem item)
public javax.swing.Icon getIconForContactHandler(java.lang.String jid)
public javax.swing.Icon getTabIconForContactHandler(org.jivesoftware.smack.packet.Presence presence)
public void deliveredNotification(java.lang.String from, java.lang.String packetID)
deliveredNotification
in interface org.jivesoftware.smackx.MessageEventNotificationListener
public void displayedNotification(java.lang.String from, java.lang.String packetID)
displayedNotification
in interface org.jivesoftware.smackx.MessageEventNotificationListener
public void composingNotification(java.lang.String from, java.lang.String packetID)
composingNotification
in interface org.jivesoftware.smackx.MessageEventNotificationListener
public void offlineNotification(java.lang.String from, java.lang.String packetID)
offlineNotification
in interface org.jivesoftware.smackx.MessageEventNotificationListener
public void cancelledNotification(java.lang.String from, java.lang.String packetID)
cancelledNotification
in interface org.jivesoftware.smackx.MessageEventNotificationListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |