public class ConferenceChatManager extends java.lang.Object implements ChatRoomMessageListener, ChatRoomInvitationListener, ChatRoomInvitationRejectionListener, AdHocChatRoomMessageListener, AdHocChatRoomInvitationListener, AdHocChatRoomInvitationRejectionListener, LocalUserChatRoomPresenceListener, LocalUserAdHocChatRoomPresenceListener, org.osgi.framework.ServiceListener, ChatRoomLocalUserRoleListener
Constructor and Description |
---|
ConferenceChatManager()
Creates an instance of ConferenceChatManager.
|
Modifier and Type | Method and Description |
---|---|
void |
acceptInvitation(AdHocChatRoomInvitation invitation,
OperationSetAdHocMultiUserChat multiUserChatOpSet)
Called to accept an incoming invitation.
|
void |
addAdHocChatRoomListChangeListener(AdHocChatRoomListChangeListener l)
Adds the given AdHocChatRoomListChangeListener that will listen
for all changes of the chat room list data model.
|
void |
addHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper,
HistoryWindow historyWindow)
Adds a history window for a given chat room in the table of opened
history windows.
|
boolean |
containsHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
Checks if there's an open history window for the given chat room.
|
AdHocChatRoomWrapper |
createAdHocChatRoom(ProtocolProviderService protocolProvider,
java.util.Collection<java.lang.String> contacts,
java.lang.String reason)
Creates an ad-hoc chat room, by specifying the ad-hoc chat room name, the
parent protocol provider and eventually, the contacts invited to
participate in this ad-hoc chat room.
|
AdHocChatRoomList |
getAdHocChatRoomList()
Returns all chat room providers currently contained in the ad-hoc chat
room list.
|
HistoryWindow |
getHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
Returns the history window for the given chat room.
|
void |
invitationReceived(AdHocChatRoomInvitationReceivedEvent evt)
Indicates that an invitation has been received and opens the invitation
dialog to notify the user.
|
void |
invitationReceived(ChatRoomInvitationReceivedEvent evt)
Handles ChatRoomInvitationReceivedEvent-s.
|
void |
invitationRejected(AdHocChatRoomInvitationRejectedEvent evt)
Called when an invitee rejects an invitation previously sent by us.
|
void |
invitationRejected(ChatRoomInvitationRejectedEvent evt)
Called when an invitee rejects an invitation previously sent by us.
|
void |
joinChatRoom(AdHocChatRoom chatRoom)
Joins the given chat room and manages all the exceptions that could
occur during the join process.
|
void |
joinChatRoom(AdHocChatRoomWrapper chatRoomWrapper)
Joins the given ad-hoc chat room
|
void |
leaveChatRoom(AdHocChatRoomWrapper chatRoomWrapper)
Leaves the given ChatRoom.
|
void |
leaveChatRoom(ChatRoomWrapper chatRoomWrapper)
Leaves the given ChatRoom.
|
void |
localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
Implements the
LocalUserAdHocChatRoomPresenceListener.localUserPresenceChanged
method
|
void |
localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
Implements the
LocalUserChatRoomPresenceListener.localUserPresenceChanged
method.
|
void |
localUserRoleChanged(ChatRoomLocalUserRoleChangeEvent evt)
Called to notify interested parties that a change in the role of the
local user participant in a particular chat room has occurred.
|
void |
messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
Implements the AdHocChatRoomMessageListener.messageDelivered
method.
|
void |
messageDelivered(ChatRoomMessageDeliveredEvent evt)
Implements the ChatRoomMessageListener.messageDelivered method.
|
void |
messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
Implements AdHocChatRoomMessageListener.messageDeliveryFailed
method.
|
void |
messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
Implements the ChatRoomMessageListener.messageDeliveryFailed
method.
|
void |
messageReceived(AdHocChatRoomMessageReceivedEvent evt)
Implements the AdHocChatRoomMessageListener.messageReceived
method.
|
void |
messageReceived(ChatRoomMessageReceivedEvent evt)
Implements the ChatRoomMessageListener.messageReceived method.
|
void |
rejectInvitation(OperationSetAdHocMultiUserChat multiUserChatAdHocOpSet,
AdHocChatRoomInvitation invitation,
java.lang.String reason)
Rejects the given invitation with the specified reason.
|
void |
removeAdHocChatRoomListChangeListener(AdHocChatRoomListChangeListener l)
Removes the given AdHocChatRoomListChangeListener.
|
void |
removeChatRoom(ChatRoomWrapper chatRoomWrapper)
Removes the given chat room from the UI.
|
void |
removeHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
Removes the history window for the given chat room.
|
void |
serviceChanged(org.osgi.framework.ServiceEvent event)
Handles ServiceEvents triggered by adding or removing a
ProtocolProviderService.
|
public ConferenceChatManager()
public AdHocChatRoomList getAdHocChatRoomList()
public void invitationReceived(ChatRoomInvitationReceivedEvent evt)
invitationReceived
in interface ChatRoomInvitationListener
evt
- the ChatRoomInvitationReceivedEvent that contains the
newly received invitation and its source provider.public void invitationRejected(ChatRoomInvitationRejectedEvent evt)
ChatRoomInvitationRejectionListener
invitationRejected
in interface ChatRoomInvitationRejectionListener
evt
- the instance of the ChatRoomInvitationRejectedEvent
containing the rejected chat room invitation as well as the source
provider where this happened.public void messageDelivered(ChatRoomMessageDeliveredEvent evt)
messageDelivered
in interface ChatRoomMessageListener
evt
- the ChatRoomMessageDeliveredEvent that notified us
that the message was delivered to its destinationpublic void messageReceived(ChatRoomMessageReceivedEvent evt)
messageReceived
in interface ChatRoomMessageListener
evt
- the ChatRoomMessageReceivedEvent that notified us
that a message has been receivedpublic void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
messageDeliveryFailed
in interface ChatRoomMessageListener
evt
- the ChatRoomMessageDeliveryFailedEvent that notified
us of a delivery failurepublic void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
localUserAdHocPresenceChanged
in interface LocalUserAdHocChatRoomPresenceListener
evt
- the LocalUserAdHocChatRoomPresenceChangeEvent that
notified us of a presence changepublic void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
localUserPresenceChanged
in interface LocalUserChatRoomPresenceListener
evt
- the LocalUserChatRoomPresenceChangeEvent that
notified uspublic void acceptInvitation(AdHocChatRoomInvitation invitation, OperationSetAdHocMultiUserChat multiUserChatOpSet) throws OperationFailedException
invitation
- the invitation to acceptmultiUserChatOpSet
- the operation set for chat conferencingOperationFailedException
- if the accept failspublic void rejectInvitation(OperationSetAdHocMultiUserChat multiUserChatAdHocOpSet, AdHocChatRoomInvitation invitation, java.lang.String reason)
multiUserChatAdHocOpSet
- the operation set to use for rejecting the
invitationinvitation
- the invitation to rejectreason
- the reason for the rejectionpublic AdHocChatRoomWrapper createAdHocChatRoom(ProtocolProviderService protocolProvider, java.util.Collection<java.lang.String> contacts, java.lang.String reason)
protocolProvider
- the parent protocol provider.contacts
- the contacts invited when creating the chat room.reason
- the reason for this invitationpublic void joinChatRoom(AdHocChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- public void removeChatRoom(ChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the chat room to remove.public void joinChatRoom(AdHocChatRoom chatRoom)
chatRoom
- the chat room to joinpublic void leaveChatRoom(ChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the ChatRoom to leave.public void leaveChatRoom(AdHocChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the ChatRoom to leave.public boolean containsHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the chat room wrapper to check forpublic HistoryWindow getHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the chat room wrapper to search forpublic void addHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper, HistoryWindow historyWindow)
chatRoomWrapper
- the chat room wrapper to addhistoryWindow
- the history window to addpublic void removeHistoryWindowForChatRoom(ChatRoomWrapper chatRoomWrapper)
chatRoomWrapper
- the chat room wrapper to remove the history windowpublic void addAdHocChatRoomListChangeListener(AdHocChatRoomListChangeListener l)
l
- the listener to add.public void removeAdHocChatRoomListChangeListener(AdHocChatRoomListChangeListener l)
l
- the listener to remove.public void serviceChanged(org.osgi.framework.ServiceEvent event)
serviceChanged
in interface org.osgi.framework.ServiceListener
event
- The event to handle.public void invitationReceived(AdHocChatRoomInvitationReceivedEvent evt)
invitationReceived
in interface AdHocChatRoomInvitationListener
evt
- the AdHocChatRoomInvitationReceivedEvent that
notified uspublic void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
messageDelivered
in interface AdHocChatRoomMessageListener
evt
- the AdHocChatRoomMessageDeliveredEvent that notified
uspublic void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
messageDeliveryFailed
in interface AdHocChatRoomMessageListener
evt
- the AdHocChatRoomMessageDeliveryFailedEvent that
notified uspublic void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
messageReceived
in interface AdHocChatRoomMessageListener
evt
- the AdHocChatRoomMessageReceivedEvent that notified
uspublic void invitationRejected(AdHocChatRoomInvitationRejectedEvent evt)
AdHocChatRoomInvitationRejectionListener
invitationRejected
in interface AdHocChatRoomInvitationRejectionListener
evt
- the instance of the AdHocChatRoomInvitationRejectedEvent
containing the rejected ad-hoc chat room invitation as well as the source
provider where this happened.public void localUserRoleChanged(ChatRoomLocalUserRoleChangeEvent evt)
ChatRoomLocalUserRoleListener
localUserRoleChanged
in interface ChatRoomLocalUserRoleListener
evt
- the ChatRoomLocalUserRoleChangeEvent instance
containing the source chat room and role old and new state.
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.