for (Iterator i = participantListeners.iterator(); i
.hasNext();) {
IChatRoomParticipantListener l = (IChatRoomParticipantListener) i
.next();
l.handleArrived(new User(participantID));
l.handlePresenceUpdated(participantID,
createPresence(true));
}
}
} else {
ID removeID = removeChannelParticipant(createIDFromString(users[j]));
if (removeID != null) {
// Notify all listeners
for (Iterator i = participantListeners.iterator(); i
.hasNext();) {
IChatRoomParticipantListener l = (IChatRoomParticipantListener) i
.next();
l.handlePresenceUpdated(removeID, createPresence(false));
l.handleDeparted(new User(removeID));
}
}
}
}