public class OperationSetMultiUserChatIrcImpl extends AbstractOperationSetMultiUserChat
Constructor and Description |
---|
OperationSetMultiUserChatIrcImpl(ProtocolProviderServiceIrcImpl provider)
Instantiates the user operation set with a currently valid instance of
the irc protocol provider.
|
Modifier and Type | Method and Description |
---|---|
ChatRoom |
createChatRoom(java.lang.String roomName,
java.util.Map<java.lang.String,java.lang.Object> roomProperties)
Creates a room with the named roomName and according to the
specified roomProperties on the server that this protocol
provider is currently connected to.
|
ChatRoomIrcImpl |
findOrCreateRoom(java.lang.String roomName)
Find an existing room with the provided name, or create a new room with
this name.
|
ChatRoomIrcImpl |
findRoom(java.lang.String roomName)
Returns a reference to a chatRoom named roomName.
|
protected ChatRoomMemberIrcImpl |
findSystemMember()
Returns the system room member.
|
protected ChatRoomIrcImpl |
findSystemRoom()
Returns the room corresponding to the server channel.
|
protected void |
fireInvitationEvent(ChatRoom targetChatRoom,
java.lang.String inviter,
java.lang.String reason,
byte[] password)
Delivers a ChatRoomInvitationReceivedEvent to all
registered ChatRoomInvitationListeners.
|
protected ChatRoomIrcImpl |
getChatRoom(java.lang.String chatRoomName)
Returns a reference to the chat room named chatRoomName or
null if the room hasn't been cached yet.
|
java.util.List<ChatRoom> |
getCurrentlyJoinedChatRooms()
Returns a list of the chat rooms that we have joined and are currently
active in.
|
java.util.List<java.lang.String> |
getCurrentlyJoinedChatRooms(ChatRoomMember chatRoomMember)
Returns a list of the chat rooms that chatRoomMember has joined
and is currently active in.
|
java.util.List<java.lang.String> |
getExistingChatRooms()
Returns the List of ChatRooms currently available on
the server that this protocol provider is connected to.
|
boolean |
isMultiChatSupportedByContact(Contact contact)
Returns true if contact supports multi-user chat sessions.
|
boolean |
isPrivateMessagingContact(java.lang.String contactAddress)
Checks if the contact address is associated with private messaging
contact or not.
|
(package private) void |
openChatRoomWindow(ChatRoomIrcImpl chatRoom)
Open a chat room window.
|
void |
registerChatRoomInstance(ChatRoomIrcImpl chatroom)
Register chat room instance in case it is not yet registered.
|
void |
rejectInvitation(ChatRoomInvitation invitation,
java.lang.String reason)
There is no such thing as a rejection to an invitatation.
|
addInvitationListener, addInvitationRejectionListener, addPresenceListener, fireInvitationReceived, fireInvitationRejectedEvent, fireLocalUserPresenceEvent, fireLocalUserPresenceEvent, removeInvitationListener, removeInvitationRejectionListener, removePresenceListener
public OperationSetMultiUserChatIrcImpl(ProtocolProviderServiceIrcImpl provider)
provider
- a currently valid instance of
ProtocolProviderServiceIrcImpl.public java.util.List<java.lang.String> getExistingChatRooms() throws OperationFailedException
OperationFailedException
- if we failed retrieving this list from
the server.public java.util.List<ChatRoom> getCurrentlyJoinedChatRooms()
public java.util.List<java.lang.String> getCurrentlyJoinedChatRooms(ChatRoomMember chatRoomMember)
chatRoomMember
- the chat room member whose current ChatRooms we
will be querying.public ChatRoom createChatRoom(java.lang.String roomName, java.util.Map<java.lang.String,java.lang.Object> roomProperties) throws OperationFailedException, OperationNotSupportedException
roomName
- the name of the ChatRoom to create.roomProperties
- properties specifying how the room should be
created.OperationFailedException
- if the room couldn't be created for some
reason (e.g. room already exists; user already joined to an existent
room or user has no permissions to create a chat room).OperationNotSupportedException
- if chat room creation is not
supported by this serverpublic ChatRoomIrcImpl findRoom(java.lang.String roomName)
roomName
- the name of the ChatRoom that we're looking for.public ChatRoomIrcImpl findOrCreateRoom(java.lang.String roomName)
roomName
- name of the chat roompublic void rejectInvitation(ChatRoomInvitation invitation, java.lang.String reason)
invitation
- the invitation we are rejecting.reason
- the reason of rejectingpublic boolean isMultiChatSupportedByContact(Contact contact)
contact
- reference to the contact whose support for chat rooms
we are currently querying.protected ChatRoomIrcImpl getChatRoom(java.lang.String chatRoomName)
chatRoomName
- the name of the room we're looking for.public void registerChatRoomInstance(ChatRoomIrcImpl chatroom)
chatroom
- the chatroomprotected void fireInvitationEvent(ChatRoom targetChatRoom, java.lang.String inviter, java.lang.String reason, byte[] password)
targetChatRoom
- the room that invitation refers toinviter
- the inviter that sent the invitationreason
- the reason why the inviter sent the invitationpassword
- the password to use when joining the roomprotected ChatRoomIrcImpl findSystemRoom()
protected ChatRoomMemberIrcImpl findSystemMember()
public boolean isPrivateMessagingContact(java.lang.String contactAddress)
void openChatRoomWindow(ChatRoomIrcImpl chatRoom)
chatRoom
- the chat room
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.