public interface AdHocChatRoom
Modifier and Type | Method and Description |
---|---|
void |
addMessageListener(AdHocChatRoomMessageListener listener)
Registers listener so that it would receive events every time a
new message is received on this ad-hoc chat room.
|
void |
addParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
Adds a listener that will be notified of changes in our participation in
the ad-hoc room such as us being join, left...
|
Message |
createMessage(java.lang.String messageText)
Create a Message instance for sending a simple text messages
with default (text/plain) content type and encoding.
|
java.lang.String |
getIdentifier()
Returns the identifier of this AdHocChatRoom.
|
java.lang.String |
getName()
Returns the name of this AdHocChatRoom.
|
ProtocolProviderService |
getParentProvider()
Returns a reference to the provider that created this room.
|
java.util.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 ad-hoc
chat room.
|
void |
invite(java.lang.String userAddress,
java.lang.String reason)
Invites another Contact to this ad-hoc chat room.
|
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()
Leaves this chat room.
|
void |
removeMessageListener(AdHocChatRoomMessageListener listener)
Removes listener so that it won't receive any further message
events from this ad-hoc room.
|
void |
removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
Removes a participant presence listener.
|
void |
sendMessage(Message message)
Sends the Message to this ad-hoc chat room.
|
java.lang.String getName()
java.lang.String getIdentifier()
void addParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
listener
- a member participation listener.void removeParticipantPresenceListener(AdHocChatRoomParticipantPresenceListener listener)
listener
- a member participation listener.void addMessageListener(AdHocChatRoomMessageListener listener)
listener
- a MessageListener that would be notified every
time a new message is received on this ad-hoc chat room.void removeMessageListener(AdHocChatRoomMessageListener listener)
listener
- the MessageListener to remove from this ad-hoc
roomvoid invite(java.lang.String userAddress, java.lang.String reason)
userAddress
- the address of the Contact of the user to
invite to the ad-hoc room.reason
- a reason, subject, or welcome message that would tell
users why they are being invited.java.util.List<Contact> getParticipants()
int getParticipantsCount()
Message createMessage(java.lang.String messageText)
messageText
- the string content of the message.void sendMessage(Message message) throws OperationFailedException
message
- the Message to send.OperationFailedException
- if sending the message fails for some
reason.ProtocolProviderService getParentProvider()
void join() throws OperationFailedException
OperationFailedException
- with the corresponding code if an error
occurs while joining the ad-hoc room.void leave()
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.