|
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 | |||||||||
public interface ChatRoom
Represents a chat channel/room/rendez-vous point/ where multiple chat users could rally and communicate in a many-to-many fashion.
| Method Summary | |
|---|---|
void |
addLocalUserRoleListener(ChatRoomLocalUserRoleListener listener)
Adds a listener that will be notified of changes in our role in the room such as us being granded operator. |
void |
addMemberPresenceListener(ChatRoomMemberPresenceListener listener)
Adds a listener that will be notified of changes in our participation in the room such as us being kicked, join, left... |
void |
addMemberPropertyChangeListener(ChatRoomMemberPropertyChangeListener listener)
Adds a listener that will be notified of changes in the property of a room member such as the nickname being changed. |
void |
addMemberRoleListener(ChatRoomMemberRoleListener listener)
Adds a listener that will be notified of changes of a member role in the room such as being granded operator. |
void |
addMessageListener(ChatRoomMessageListener listener)
Registers listener so that it would receive events every time a new message is received on this chat room. |
void |
addPropertyChangeListener(ChatRoomPropertyChangeListener listener)
Adds a listener that will be notified of changes in the property of the room such as the subject being change or the room state being changed. |
void |
banParticipant(ChatRoomMember chatRoomMember,
String reason)
Bans a user from the room. |
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. |
Iterator<ChatRoomMember> |
getBanList()
Returns an Iterator over a set of ban masks for this chat room. |
ChatRoomConfigurationForm |
getConfigurationForm()
Returns the ChatRoomConfigurationForm containing all configuration properties for this chat room. |
String |
getIdentifier()
Returns the identifier of this ChatRoom. |
List<ChatRoomMember> |
getMembers()
Returns a List of ChatRoomMembers corresponding to all members currently participating in this room. |
int |
getMembersCount()
Returns the number of participants that are currently in this chat room. |
String |
getName()
Returns the name of this ChatRoom. |
ProtocolProviderService |
getParentProvider()
Returns a reference to the provider that created this 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. |
ChatRoomMemberRole |
getUserRole()
Returns the local user's role in the context of this chat room or null if not currently joined. |
void |
grantAdmin(String address)
Grants administrator privileges to another user. |
void |
grantMembership(String address)
Grants membership to a user. |
void |
grantModerator(String nickname)
Grants moderator privileges to a participant or visitor. |
void |
grantOwnership(String address)
Grants ownership privileges to another user. |
void |
grantVoice(String nickname)
Grants voice to a visitor in the room. |
void |
invite(String userAddress,
String reason)
Invites another user to this room. |
boolean |
isJoined()
Returns true if the local user is currently in the multi user chat (after calling one of the join() methods). |
boolean |
isPersistent()
Determines whether this chat room should be stored in the configuration file or not. |
boolean |
isSystem()
Returns true if this chat room is a system room and
false otherwise. |
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 |
join(byte[] password)
Joins this chat room so that the user would start receiving events and messages for it. |
void |
joinAs(String nickname)
Joins this chat room with the specified nickname so that the user would start receiving events and messages for it. |
void |
joinAs(String nickname,
byte[] password)
Joins this chat room with the specified nickname and password so that the user would start receiving events and messages for it. |
void |
kickParticipant(ChatRoomMember chatRoomMember,
String reason)
Kicks a visitor or participant from the room. |
void |
leave()
Leave this chat room. |
void |
removelocalUserRoleListener(ChatRoomLocalUserRoleListener listener)
Removes a listener that was being notified of changes in our role in this chat room such as us being granded operator. |
void |
removeMemberPresenceListener(ChatRoomMemberPresenceListener listener)
Removes a listener that was being notified of changes in the participation of other chat room participants such as users being kicked, join, left. |
void |
removeMemberPropertyChangeListener(ChatRoomMemberPropertyChangeListener listener)
Removes a listener that was being notified of changes in the property of a chat room member such as the nickname being changed. |
void |
removeMemberRoleListener(ChatRoomMemberRoleListener listener)
Removes a listener that was being notified of changes of a member role in this chat room such as us being granded operator. |
void |
removeMessageListener(ChatRoomMessageListener listener)
Removes listener so that it won't receive any further message events from this room. |
void |
removePropertyChangeListener(ChatRoomPropertyChangeListener listener)
Removes a listener that was being notified of changes in the property of the chat room such as the subject being change or the room state being changed. |
void |
revokeAdmin(String address)
Revokes administrator privileges from a user. |
void |
revokeMembership(String address)
Revokes a user's membership. |
void |
revokeModerator(String nickname)
Revokes moderator privileges from another user. |
void |
revokeOwnership(String address)
Revokes ownership privileges from another user. |
void |
revokeVoice(String nickname)
Revokes voice from a participant in the room. |
void |
sendMessage(Message message)
Sends the message to this chat room. |
void |
setLocalUserRole(ChatRoomMemberRole role)
Changes the the local user's nickname in the context of this chatroom. |
void |
setSubject(String subject)
Sets the subject of this chat room. |
void |
setUserNickname(String nickname)
Changes the the local user's nickname in the context of this chatroom. |
| Method Detail |
|---|
String getName()
String getIdentifier()
void join()
throws OperationFailedException
OperationFailedException - with the corresponding code if an error
occurs while joining the room.
void join(byte[] password)
throws OperationFailedException
password - the password to use when authenticating on the chatroom.
OperationFailedException - with the corresponding code if an error
occurs while joining the room.
void joinAs(String nickname)
throws OperationFailedException
nickname - the nickname to use.
OperationFailedException - with the corresponding code if an error
occurs while joining the room.
void joinAs(String nickname,
byte[] password)
throws OperationFailedException
nickname - the nickname to use.password - a password necessary to authenticate when joining the
room.
OperationFailedException - with the corresponding code if an error
occurs while joining the room.boolean isJoined()
join() methods).
void leave()
String getSubject()
To be notified every time the room's subject change you should add a
ChatRoomChangelistener to this room.
addPropertyChangeListener(ChatRoomPropertyChangeListener)
To change the room's subject use setSubject(String).
void setSubject(String subject)
throws OperationFailedException
subject - the new subject that we'd like this room to have
OperationFailedException - if the user doesn't have the right to
change this property.String getUserNickname()
ChatRoomMemberRole getUserRole()
void setLocalUserRole(ChatRoomMemberRole role)
throws OperationFailedException
role - the new role to set for the local user.
OperationFailedException - if an error occurs.
void setUserNickname(String nickname)
throws OperationFailedException
nickname - the new nickname within the room.
OperationFailedException - if the new nickname already exist in
this roomvoid addMemberPresenceListener(ChatRoomMemberPresenceListener listener)
listener - a member participation listener.void removeMemberPresenceListener(ChatRoomMemberPresenceListener listener)
listener - a member participation listener.void addLocalUserRoleListener(ChatRoomLocalUserRoleListener listener)
listener - a local user role listener.void removelocalUserRoleListener(ChatRoomLocalUserRoleListener listener)
listener - a local user role listener.void addMemberRoleListener(ChatRoomMemberRoleListener listener)
listener - a member role listener.void removeMemberRoleListener(ChatRoomMemberRoleListener listener)
listener - a member role listener.void addPropertyChangeListener(ChatRoomPropertyChangeListener listener)
listener - a property change listener.void removePropertyChangeListener(ChatRoomPropertyChangeListener listener)
listener - a property change listener.void addMemberPropertyChangeListener(ChatRoomMemberPropertyChangeListener listener)
listener - a room member property change listener.void removeMemberPropertyChangeListener(ChatRoomMemberPropertyChangeListener listener)
listener - a room member property change listener.
void invite(String userAddress,
String reason)
If the room is password-protected, the invitee will receive a password to use to join the room. If the room is members-only, the the invitee may be added to the member list.
userAddress - the address of the user to invite to the room.(one
may also invite users not on their contact list).reason - a reason, subject, or welcome message that would tell the
the user why they are being invited.List<ChatRoomMember> getMembers()
int getMembersCount()
void addMessageListener(ChatRoomMessageListener listener)
listener - a MessageListener that would be notified every
time a new message is received on this chat room.void removeMessageListener(ChatRoomMessageListener listener)
listener - the MessageListener to remove from this room
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.
Message createMessage(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()
Iterator<ChatRoomMember> getBanList()
throws OperationFailedException
OperationFailedException - if an error occured while performing the
request to the server or you don't have enough privileges to get this
information
void banParticipant(ChatRoomMember chatRoomMember,
String reason)
throws OperationFailedException
chatRoomMember - the ChatRoomMember to be banned.reason - the reason why the user was banned.
OperationFailedException - if an error occurs while banning a user.
In particular, an error can occur if a moderator or a user with an
affiliation of "owner" or "admin" was tried to be banned or if the user
that is banning have not enough permissions to ban.
void kickParticipant(ChatRoomMember chatRoomMember,
String reason)
throws OperationFailedException
chatRoomMember - the ChatRoomMember to kick from the roomreason - the reason why the participant is being kicked from the
room
OperationFailedException - if an error occurs while kicking the
participant. In particular, an error can occur if a moderator or a user
with an affiliation of "owner" or "administrator" was intended to be
kicked; or if the participant that intended to kick another participant
does not have kicking privileges;
ChatRoomConfigurationForm getConfigurationForm()
throws OperationFailedException
OperationFailedException - if the user doesn't have
permissions to see and change chat room configurationboolean isSystem()
true if this chat room is a system room and
false otherwise.
true if this chat room is a system room and
false otherwise.boolean isPersistent()
void grantAdmin(String address)
address - the user address of the user to grant administrator
privileges (e.g. "user@host.org").void grantMembership(String address)
address - the user address of the user to grant membership
privileges (e.g. "user@host.org").void grantModerator(String nickname)
nickname - the nickname of the occupant to grant moderator
privileges.void grantOwnership(String address)
address - the user address of the user to grant ownership
privileges (e.g. "user@host.org").void grantVoice(String nickname)
nickname - the nickname of the visitor to grant voice in the room
(e.g. "john").void revokeAdmin(String address)
address - the user address of the user to grant administrator
privileges (e.g. "user@host.org").void revokeMembership(String address)
address - the user address of the user to revoke membership
(e.g. "user@host.org").void revokeModerator(String nickname)
nickname - the nickname of the occupant to revoke moderator
privileges.void revokeOwnership(String address)
address - the user address of the user to revoke ownership
(e.g. "user@host.org").void revokeVoice(String nickname)
nickname - the nickname of the participant to revoke voice
(e.g. "john").
|
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 | |||||||||