|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.msn.AdHocChatRoomMsnImpl
public class AdHocChatRoomMsnImpl
Implements ad-hoc chat rooms for MSN.
| Field Summary | |
|---|---|
Vector<EventObject> |
messageBuffer
A Message buffer, will keep all messages until the MSN ad-hoc chat room is ready. |
| Constructor Summary | |
|---|---|
AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider)
Creates a new ad-hoc chat room for MSN named name, using the protocol provider provider. |
|
AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider,
net.sf.jml.MsnSwitchboard switchboard)
Creates a new ad-hoc chat room for MSN named name, using the protocol provider provider and the msn switchboard switchboard. |
|
| Method Summary | |
|---|---|
void |
addAdHocChatRoomParticipant(String id,
Contact participant)
Adds a participant to the participants list. |
void |
addMessageListener(AdHocChatRoomMessageListener listener)
Registers listener so that it would receive events every time a new message is received on this chat room. |
void |
addParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
Adds a listener that will be notified of changes in our status in the room. |
Message |
createMessage(String text)
Creates a Message for this ad-hoc chat room containing text. |
Contact |
findParticipantForAddress(String address)
Finds the participant of this ad-hoc chat room corresponding to the given address. |
void |
fireMessageEvent(EventObject evt)
Notifies all interested listeners that a AdHocChatRoomMessageDeliveredEvent, AdHocChatRoomMessageReceivedEvent or a AdHocChatRoomMessageDeliveryFailedEvent has been fired. |
Contact |
getAdHocChatRoomParticipant(String id)
Returns the participant of this ad-hoc chat room which corresponds to the given id. |
String |
getIdentifier()
Returns the identifier of this ad-hoc chat room. |
String |
getName()
Returns the name of this ad-hoc chatroom |
ProtocolProviderService |
getParentProvider()
Returns the parent provider |
List<Contact> |
getParticipants()
Returns a list containing all the Contacts who participate in this ad-hoc chat room. |
int |
getParticipantsCount()
Returns the number of Contacts who participate in this ad-hoc chat room. |
String |
getSubject()
|
void |
invite(String userAddress,
String reason)
Invites another user to this room. |
boolean |
isSystem()
|
void |
join()
Joins this ad-hoc chat room with the nickname of the local user so that the user would start receiving events and messages for it. |
void |
leave()
Leave this chat room. |
void |
removeMessageListener(AdHocChatRoomMessageListener listener)
Removes the given message listener. |
void |
removeMessageListener(ChatRoomMessageListener listener)
Removes listener so that it won't receive any further message events from this room. |
void |
removeParticipant(String id)
Removes the participant of this ad-hoc chat room which corresponds to the given id. |
void |
removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
Removes the given participant presence listener. |
void |
sendMessage(Message message)
Sends the given message through the participants of this ad-hoc chat room. |
void |
setSwitchboard(net.sf.jml.MsnSwitchboard switchboard)
Sets the corresponding switchboard. |
void |
updateParticipantsList(net.sf.jml.MsnSwitchboard switchboard)
Fills the participants list with all participants inside the switchboard (ad-hoc chat room). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public Vector<EventObject> messageBuffer
| Constructor Detail |
|---|
public AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider)
name - provider -
public AdHocChatRoomMsnImpl(String name,
ProtocolProviderServiceMsnImpl provider,
net.sf.jml.MsnSwitchboard switchboard)
name - provider - switchboard - | Method Detail |
|---|
public void addParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
addParticipantPresenceListener in interface AdHocChatRoomlistener - a participant status listener.public void addMessageListener(AdHocChatRoomMessageListener listener)
addMessageListener in interface AdHocChatRoomlistener - a MessageListener that would be notified every
time a new message is received on this chat room.public void removeMessageListener(ChatRoomMessageListener listener)
listener - the MessageListener to remove from this roompublic Contact findParticipantForAddress(String address)
address - the address to search for.
public Message createMessage(String text)
createMessage in interface AdHocChatRoomtext -
public String getName()
getName in interface AdHocChatRoompublic ProtocolProviderService getParentProvider()
getParentProvider in interface AdHocChatRoompublic List<Contact> getParticipants()
getParticipants in interface AdHocChatRoompublic Contact getAdHocChatRoomParticipant(String id)
id - ID of the participant
public void addAdHocChatRoomParticipant(String id,
Contact participant)
participant - The participant (Contact) to add.public void removeParticipant(String id)
id - ID of the participantpublic int getParticipantsCount()
getParticipantsCount in interface AdHocChatRoompublic String getSubject()
public void invite(String userAddress,
String reason)
invite in interface AdHocChatRoomuserAddress - the address of the user (email address) to invite to
the room.(one may also invite users not on their contact
list).reason - You cannot specify a Reason inside the msn protocolpublic void join()
AdHocChatRoom
join in interface AdHocChatRoompublic void leave()
leave in interface AdHocChatRoompublic boolean isSystem()
public void sendMessage(Message message)
throws OperationFailedException
sendMessage in interface AdHocChatRoommessage - the message to delivered
OperationFailedException - if send failspublic void setSwitchboard(net.sf.jml.MsnSwitchboard switchboard)
switchboard - Corresponding switchboard.public void fireMessageEvent(EventObject evt)
evt - The specific eventpublic void updateParticipantsList(net.sf.jml.MsnSwitchboard switchboard)
switchboard - The corresponding switchboardpublic String getIdentifier()
getIdentifier in interface AdHocChatRoompublic void removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
removeParticipantPresenceListener in interface AdHocChatRoomlistener - the listener to removepublic void removeMessageListener(AdHocChatRoomMessageListener listener)
removeMessageListener in interface AdHocChatRoomlistener - the listener to remove
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||