org.eclipse.ecf.presence.chatroom
Interface IChatRoomContainer

All Superinterfaces:
org.eclipse.core.runtime.IAdaptable, IContainer, IIdentifiable

public interface IChatRoomContainer
extends IContainer

A container representing a specific chat room.


Method Summary
 void addChatRoomAdminListener(IChatRoomAdminListener adminListener)
          Add chat room admin listener to listen for room admin changes.
 void addChatRoomParticipantListener(IChatRoomParticipantListener participantListener)
          Add chat room participant listener.
 void addMessageListener(IIMMessageListener listener)
          Add message listener.
 IChatRoomAdminSender getChatRoomAdminSender()
          Get chat room admin sender.
 IChatRoomMessageSender getChatRoomMessageSender()
          Get interface for sending messages
 ID[] getChatRoomParticipants()
          Returns an array of IDs of current chatroom participants.
 IChatMessageSender getPrivateMessageSender()
          Retrieve a chat message sender to send private chat messages to other participants.
 void removeChatRoomAdminListener(IChatRoomAdminListener adminListener)
          Remove chat room admin listener.
 void removeChatRoomParticipantListener(IChatRoomParticipantListener participantListener)
          Remove chat room participant listener.
 void removeMessageListener(IIMMessageListener listener)
          Remove message listener.
 
Methods inherited from interface org.eclipse.ecf.core.IContainer
addListener, connect, disconnect, dispose, getAdapter, getConnectedID, getConnectNamespace, removeListener
 
Methods inherited from interface org.eclipse.ecf.core.identity.IIdentifiable
getID
 

Method Detail

addMessageListener

void addMessageListener(IIMMessageListener listener)
Add message listener.

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

removeMessageListener

void removeMessageListener(IIMMessageListener listener)
Remove message listener.

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

getPrivateMessageSender

IChatMessageSender getPrivateMessageSender()
Retrieve a chat message sender to send private chat messages to other participants. If sending private chat messages is not supported by this provider then null will be returned.

Returns:
IChatMessageSender to use for sending chat message. If null, sending chat messages not supported by this provider.

getChatRoomMessageSender

IChatRoomMessageSender getChatRoomMessageSender()
Get interface for sending messages

Returns:
IChatRoomMessageSender. Will be null if no message sender available for the provider implementation.

addChatRoomParticipantListener

void addChatRoomParticipantListener(IChatRoomParticipantListener participantListener)
Add chat room participant listener. The given listener will be notified if/when participants are added or removed from given room.

Parameters:
participantListener - to add. Must not be null.

removeChatRoomParticipantListener

void removeChatRoomParticipantListener(IChatRoomParticipantListener participantListener)
Remove chat room participant listener.

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

addChatRoomAdminListener

void addChatRoomAdminListener(IChatRoomAdminListener adminListener)
Add chat room admin listener to listen for room admin changes.

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

removeChatRoomAdminListener

void removeChatRoomAdminListener(IChatRoomAdminListener adminListener)
Remove chat room admin listener.

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

getChatRoomAdminSender

IChatRoomAdminSender getChatRoomAdminSender()
Get chat room admin sender.

Returns:
IChatRoomAdminSender for sending admin update messages. Will return null if there is no sender available for provider.

getChatRoomParticipants

ID[] getChatRoomParticipants()
Returns an array of IDs of current chatroom participants.

Returns:
ID[] of chatroom participants. If no participants in chat room, will return an empty array. Will not return null
Since:
1.1