|
SIP Communicator: 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.icq.AdHocChatRoomIcqImpl
public class AdHocChatRoomIcqImpl
Represents an ad-hoc chat room, where multiple chat users could communicate in a many-to-many fashion.
| Constructor Summary | |
|---|---|
AdHocChatRoomIcqImpl(net.kano.joustsim.oscar.oscar.service.chatrooms.ChatInvitation chatInvitation,
ProtocolProviderServiceIcqImpl icqProvider)
Constructor for chat room instances, with a given chat room invitation. |
|
AdHocChatRoomIcqImpl(String roomName,
net.kano.joustsim.oscar.oscar.service.chatrooms.ChatRoomSession chatRoomSession,
ProtocolProviderServiceIcqImpl icqProvider)
Constructor for chat room instances. |
|
| Method Summary | |
|---|---|
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 such as us being kicked, banned, or granted admin permissions. |
Message |
createMessage(byte[] content,
String contentType,
String contentEncoding,
String subject)
Create a Message instance for sending arbitrary MIME-encoding content. |
Message |
createMessage(String messageText)
Create a Message instance for sending a simple text messages with default (text/plain) content type and encoding. |
Contact |
findParticipantForNickName(String nickName)
Finds the member of this chat room corresponding to the given nick name. |
void |
fireMessageEvent(EventObject evt)
Notifies all interested listeners that a ChatRoomMessageDeliveredEvent, ChatRoomMessageReceivedEvent or a ChatRoomMessageDeliveryFailedEvent has been fired. |
String |
getIdentifier()
Returns the identifier of this AdHocChatRoom. |
String |
getName()
Returns the name of this AdHocChatRoom. |
ProtocolProviderService |
getParentProvider()
Returns the protocol provider service that created us. |
List<Contact> |
getParticipants()
Returns a List of Contacts corresponding to all participants currently participating in this room. |
int |
getParticipantsCount()
Returns the number of participants that are currently in this chat room. |
String |
getSubject()
Returns the last known room subject/theme or null if the user hasn't joined the room or the room does not have a subject yet. |
String |
getUserNickname()
Returns the local user's nickname in the context of this chat room or null if not currently joined. |
void |
invite(String userAddress,
String reason)
Invites another user to this room. |
void |
join()
Joins this 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 listener so that it won't receive any further message events from this room. |
void |
removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
Removes a listener that was being notified of changes in the status of other ad-hoc chat room participants. |
void |
sendMessage(Message message)
Sends the message to the destination indicated by the to contact. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AdHocChatRoomIcqImpl(net.kano.joustsim.oscar.oscar.service.chatrooms.ChatInvitation chatInvitation,
ProtocolProviderServiceIcqImpl icqProvider)
chatInvitation - Chat room invitation that the user received from
the ICQ networkicqProvider - The ICQ provider
public AdHocChatRoomIcqImpl(String roomName,
net.kano.joustsim.oscar.oscar.service.chatrooms.ChatRoomSession chatRoomSession,
ProtocolProviderServiceIcqImpl icqProvider)
roomName - The name of the chat room.chatRoomSession - Chat room session from the icq networkicqProvider - The icq provider| 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 Message createMessage(byte[] content,
String contentType,
String contentEncoding,
String subject)
content - content valuecontentType - the MIME-type for contentcontentEncoding - encoding used for contentsubject - a String subject or null for now
subject.
public Message createMessage(String messageText)
createMessage in interface AdHocChatRoommessageText - the string content of the message.
public String getIdentifier()
getIdentifier in interface AdHocChatRoompublic List<Contact> getParticipants()
getParticipants in interface AdHocChatRoompublic int getParticipantsCount()
getParticipantsCount in interface AdHocChatRoompublic String getName()
getName in interface AdHocChatRoompublic ProtocolProviderService getParentProvider()
getParentProvider in interface AdHocChatRoompublic String getSubject()
To be notified every time the room's subject change you should add a ChatRoomPropertyChangelistener to this room.
public String getUserNickname()
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 - invitation message
public void join()
throws OperationFailedException
join in interface AdHocChatRoomOperationFailedException - with the corresponding code if an error
occurs while joining the room.public void leave()
leave in interface AdHocChatRoompublic void removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
removeParticipantPresenceListener in interface AdHocChatRoomlistener - a participant status listener.public void removeMessageListener(AdHocChatRoomMessageListener listener)
removeMessageListener in interface AdHocChatRoomlistener - the MessageListener to remove from this room
public void sendMessage(Message message)
throws OperationFailedException
sendMessage in interface AdHocChatRoommessage - The Message to send.
OperationFailedException - if the underlying stack is not
registered or initialized or if the chat room is not joined.public void fireMessageEvent(EventObject evt)
evt - The specific eventpublic Contact findParticipantForNickName(String nickName)
nickName - the nick name to search for.
|
SIP Communicator: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||