org.eclipse.ecf.presence.chatroom
Interface IChatRoomParticipantListener


public interface IChatRoomParticipantListener

Listener interface for receiving participant arrive and departed notifications

Note these methods will be called asynchronously when notifications of remote changes are received by the provider implementation code. The provider is free to call the methods below with an arbitrary thread, so the implementation of these methods must be appropriately prepared.

For example, if the code implementing any of these methods must interact with user interface code, then it should use code such as the following to execute on the SWT UI thread:
        Display.getDefault().asyncExec(new Runnable() {
                public void run() {
                ... UI code here
                }
        });
 
Further, the code in the implementations of these methods should not block via I/O operations or blocking UI calls.


Method Summary
 void handleArrived(IUser participant)
          Notification that participant arrived in associated chat room
 void handleDeparted(IUser participant)
          Notification that participant departed the associated chat room
 void handlePresenceUpdated(ID fromID, IPresence presence)
          Notification that a presence update has been received
 void handleUpdated(IUser updatedParticipant)
          Notification that user information (e.g.
 

Method Detail

handleArrived

void handleArrived(IUser participant)
Notification that participant arrived in associated chat room

Parameters:
participant - Will not be null. The IUser of the arrived participant

handleUpdated

void handleUpdated(IUser updatedParticipant)
Notification that user information (e.g. name, nickname, or properties) have changed for chat participant. The ID of the changedParticipant (via changedParticipant.getID()) will match the ID of the previous notification handleArrived(IUser).

Parameters:
updatedParticipant - Will not be null. The ID of the updatedParticipant will be the same as the ID previously specified via handleArrived, but the name IUser.getName() and/or the nickname IUser.getNickname() and/or the properties IUser.getProperties() may be different.

handleDeparted

void handleDeparted(IUser participant)
Notification that participant departed the associated chat room

Parameters:
participant - Will not be null. the ID of the departed participant

handlePresenceUpdated

void handlePresenceUpdated(ID fromID,
                           IPresence presence)
Notification that a presence update has been received

Parameters:
fromID - the ID of the sender of the presence update. Will not be null.
presence - the presence information for the sender. Will not be null.