org.eclipse.ecf.presence.chatroom
Interface IChatRoomManager

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable

public interface IChatRoomManager
extends org.eclipse.core.runtime.IAdaptable

Chat room manager. Entry point for getting access to chat rooms managed by this manager. Access to objects implementing this interface is provided by IPresenceContainerAdapter.getChatRoomManager()


Method Summary
 void addInvitationListener(IChatRoomInvitationListener listener)
          Add invitation listener
 IChatRoomInfo createChatRoom(java.lang.String roomName, java.util.Map properties)
          Create a chat room with the given room name and properties.
 IChatRoomInfo getChatRoomInfo(java.lang.String roomName)
          Get detailed room info for given room name
 IChatRoomInfo[] getChatRoomInfos()
          Get detailed room info for all chat rooms associated with this manager
 IChatRoomManager[] getChildren()
          Get any children managers of this IChatRoomManager.
 IHistoryManager getHistoryManager()
          Get chat room history manager.
 IChatRoomInvitationSender getInvitationSender()
          Get chat room invitation sender.
 IChatRoomManager getParent()
          Get parent IChatRoomManager.
 void removeInvitationListener(IChatRoomInvitationListener listener)
          Remove invitation listener
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 

Method Detail

addInvitationListener

void addInvitationListener(IChatRoomInvitationListener listener)
Add invitation listener

Parameters:
listener - the invitation listener to add. Must not be null.

removeInvitationListener

void removeInvitationListener(IChatRoomInvitationListener listener)
Remove invitation listener

Parameters:
listener - the invitation listener to remove. Must not be null.

getInvitationSender

IChatRoomInvitationSender getInvitationSender()
Get chat room invitation sender. If null, this chat room manager does not support the ability to send invitations.

Returns:
IChatRoomInvitationSender to use to send invitations. May be null, and in that case no invitation sending ability is available from this chat manager.

getParent

IChatRoomManager getParent()
Get parent IChatRoomManager. If this manager is the root, then this method returns null.

Returns:
IChatRoomManager instance if this manager has a parent. Returns null if this manager is the root of the hierarchy.

getChildren

IChatRoomManager[] getChildren()
Get any children managers of this IChatRoomManager. If this chat room manager has children chat room managers, then the returned array will have more than zero elements. If this IChatRoomManager has no children, then a zero-length array will be returned.

Returns:
IChatRoomManager[] of children for this chat room manager. If no children, a zero-length array will be returned. null will not be returned.

getChatRoomInfo

IChatRoomInfo getChatRoomInfo(java.lang.String roomName)
Get detailed room info for given room name

Parameters:
roomName - the name of the room to get detailed info for. If null, the room info is assumed to be a room associated with the chat room manager instance itself. For example, for IRC, the chat room manager is also a chat room where message can be sent/received
Returns:
IChatRoomInfo an instance that provides the given info. Returns null if no chat room info associated with given name or null

getChatRoomInfos

IChatRoomInfo[] getChatRoomInfos()
Get detailed room info for all chat rooms associated with this manager

Returns:
IChatRoomInfo an array of instances that provide info for all chat rooms. Will return empty array if there are no available chat rooms. Will not return null.

createChatRoom

IChatRoomInfo createChatRoom(java.lang.String roomName,
                             java.util.Map properties)
                             throws ChatRoomCreateException
Create a chat room with the given room name and properties.

Parameters:
roomName - the name of the room. Must not be null.
properties - properties associated with the room's creation. May be null.
Returns:
IChatRoomInfo room info suitable for creating a chat room container and connecting. Will not be null.
Throws:
ChatRoomCreateException - if roomName is null, or if chat room creation cannot occur (e.g. server refuses, name collision occurs, user has insufficient rights to perform creation operation, etc).

getHistoryManager

IHistoryManager getHistoryManager()
Get chat room history manager. Will not return null.

Returns:
IHistoryManager. Will not return null.