Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.msghistory
Class MessageHistoryServiceImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl
All Implemented Interfaces:
EventListener, MessageHistoryService, AdHocChatRoomMessageListener, ChatRoomMessageListener, LocalUserAdHocChatRoomPresenceListener, LocalUserChatRoomPresenceListener, MessageListener, org.osgi.framework.ServiceListener

public class MessageHistoryServiceImpl
extends Object
implements MessageHistoryService, MessageListener, ChatRoomMessageListener, AdHocChatRoomMessageListener, org.osgi.framework.ServiceListener, LocalUserChatRoomPresenceListener, LocalUserAdHocChatRoomPresenceListener

The Message History Service stores messages exchanged through the various protocols Logs messages for all protocol providers that support basic instant messaging (i.e. those that implement OperationSetBasicInstantMessaging).

Author:
Alexander Pelov, Damian Minkov, Lubomir Marinov, Valentin Martinet

Nested Class Summary
(package private) static class MessageHistoryServiceImpl.ChatRoomMemberImpl
          Simple ChatRoomMember implementation.
 
Constructor Summary
MessageHistoryServiceImpl()
           
 
Method Summary
 void addSearchProgressListener(MessageHistorySearchProgressListener listener)
          Adding progress listener for monitoring progress of search process
 int countRecords(Map<?,HistoryReader> readers)
          Total count of records for supplied history readers will read through
 Collection<EventObject> findByEndDate(ChatRoom room, Date endDate)
          Returns all the messages exchanged in the supplied chat room before the given date
 Collection<EventObject> findByEndDate(MetaContact contact, Date endDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact before the given date
 Collection<EventObject> findByKeyword(ChatRoom room, String keyword)
          Returns all the messages exchanged in the supplied room having the given keyword
 Collection<EventObject> findByKeyword(ChatRoom room, String keyword, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room having the given keyword
 Collection<EventObject> findByKeyword(MetaContact contact, String keyword)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword
 Collection<EventObject> findByKeyword(MetaContact contact, String keyword, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword
 Collection<EventObject> findByKeywords(ChatRoom room, String[] keywords)
          Returns all the messages exchanged in the supplied chat room having the given keywords
 Collection<EventObject> findByKeywords(ChatRoom room, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room having the given keywords
 Collection<EventObject> findByKeywords(MetaContact contact, String[] keywords)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords
 Collection<EventObject> findByKeywords(MetaContact contact, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate)
          Returns all the messages exchanged in the supplied chat room between the given dates
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate, String[] keywords)
          Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(ChatRoom room, Date startDate, Date endDate, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate, String[] keywords)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords
 Collection<EventObject> findByPeriod(MetaContact contact, Date startDate, Date endDate, String[] keywords, boolean caseSensitive)
          Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords
 Collection<EventObject> findByStartDate(ChatRoom room, Date startDate)
          Returns all the messages exchanged in the supplied chat room after the given date
 Collection<EventObject> findByStartDate(MetaContact contact, Date startDate)
          Returns all the messages exchanged by all the contacts in the supplied metacontact after the given date
 Collection<EventObject> findFirstMessagesAfter(ChatRoom room, Date date, int count)
          Returns the supplied number of recent messages after the given date exchanged in the supplied chat room
 Collection<EventObject> findFirstMessagesAfter(MetaContact contact, Date date, int count)
          Returns the supplied number of recent messages after the given date exchanged by all the contacts in the supplied metacontact
 Collection<EventObject> findLast(ChatRoom room, int count)
          Returns the supplied number of recent messages exchanged in the supplied chat room
 Collection<EventObject> findLast(MetaContact contact, int count)
          Returns the supplied number of recent messages exchanged by all the contacts in the supplied metacontact
 Collection<EventObject> findLastMessagesBefore(ChatRoom room, Date date, int count)
          Returns the supplied number of recent messages before the given date exchanged in the supplied chat room
 Collection<EventObject> findLastMessagesBefore(MetaContact contact, Date date, int count)
          Returns the supplied number of recent messages before the given date exchanged by all the contacts in the supplied metacontact
 HistoryService getHistoryService()
          Returns the history service.
static ResourceManagementService getResources()
          Get ResourceManagementService registered.
 void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
          Called to notify interested parties that a change in our presence in an ad-hoc chat room has occurred.
 void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
          Called to notify interested parties that a change in our presence in a chat room has occured.
 void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.
 void messageDelivered(ChatRoomMessageDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.
 void messageDelivered(MessageDeliveredEvent evt)
          Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.
 void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
          Called to indicate that delivery of a message sent earlier to the chat room has failed.
 void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
          Called to indicate that delivery of a message sent earlier to the chat room has failed.
 void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
          Called to indicated that delivery of a message sent earlier has failed.
 void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void messageReceived(ChatRoomMessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void messageReceived(MessageReceivedEvent evt)
          Called when a new incoming Message has been received.
 void removeSearchProgressListener(MessageHistorySearchProgressListener listener)
          Removing progress listener
 void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
          When new protocol provider is registered we check does it supports BasicIM and if so add a listener to it
 void setHistoryService(HistoryService historyService)
          Set the configuration service.
 void start(org.osgi.framework.BundleContext bc)
          Starts the service.
 void stop(org.osgi.framework.BundleContext bc)
          Stops the service.
 void unsetHistoryService(HistoryService historyService)
          Remove a configuration service.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageHistoryServiceImpl

public MessageHistoryServiceImpl()
Method Detail

getHistoryService

public HistoryService getHistoryService()
Returns the history service.

Returns:
the history service

findByStartDate

public Collection<EventObject> findByStartDate(MetaContact contact,
                                               Date startDate)
                                        throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact after the given date

Specified by:
findByStartDate in interface MessageHistoryService
Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByEndDate

public Collection<EventObject> findByEndDate(MetaContact contact,
                                             Date endDate)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact before the given date

Specified by:
findByEndDate in interface MessageHistoryService
Parameters:
contact - MetaContact
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

public Collection<EventObject> findByPeriod(MetaContact contact,
                                            Date startDate,
                                            Date endDate)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

public Collection<EventObject> findByPeriod(MetaContact contact,
                                            Date startDate,
                                            Date endDate,
                                            String[] keywords)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

public Collection<EventObject> findByKeyword(MetaContact contact,
                                             String keyword)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword

Specified by:
findByKeyword in interface MessageHistoryService
Parameters:
contact - MetaContact
keyword - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

public Collection<EventObject> findByKeywords(MetaContact contact,
                                              String[] keywords)
                                       throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords

Specified by:
findByKeywords in interface MessageHistoryService
Parameters:
contact - MetaContact
keywords - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLast

public Collection<EventObject> findLast(MetaContact contact,
                                        int count)
                                 throws RuntimeException
Returns the supplied number of recent messages exchanged by all the contacts in the supplied metacontact

Specified by:
findLast in interface MessageHistoryService
Parameters:
contact - MetaContact
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findFirstMessagesAfter

public Collection<EventObject> findFirstMessagesAfter(MetaContact contact,
                                                      Date date,
                                                      int count)
                                               throws RuntimeException
Returns the supplied number of recent messages after the given date exchanged by all the contacts in the supplied metacontact

Specified by:
findFirstMessagesAfter in interface MessageHistoryService
Parameters:
contact - MetaContact
date - messages after date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLastMessagesBefore

public Collection<EventObject> findLastMessagesBefore(MetaContact contact,
                                                      Date date,
                                                      int count)
                                               throws RuntimeException
Returns the supplied number of recent messages before the given date exchanged by all the contacts in the supplied metacontact

Specified by:
findLastMessagesBefore in interface MessageHistoryService
Parameters:
contact - MetaContact
date - messages before date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

start

public void start(org.osgi.framework.BundleContext bc)
Starts the service. Check the current registered protocol providers which supports BasicIM and adds message listener to them

Parameters:
bc - BundleContext

stop

public void stop(org.osgi.framework.BundleContext bc)
Stops the service.

Parameters:
bc - BundleContext

messageReceived

public void messageReceived(MessageReceivedEvent evt)
Description copied from interface: MessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface MessageListener
Parameters:
evt - the MessageReceivedEvent containing the newly received message, its sender and other details.

messageDelivered

public void messageDelivered(MessageDeliveredEvent evt)
Description copied from interface: MessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface MessageListener
Parameters:
evt - the MessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
Description copied from interface: MessageListener
Called to indicated that delivery of a message sent earlier has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface MessageListener
Parameters:
evt - the MessageFailedEvent containing the ID of the message whose delivery has failed.

messageReceived

public void messageReceived(ChatRoomMessageReceivedEvent evt)
Description copied from interface: ChatRoomMessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface ChatRoomMessageListener
Parameters:
evt - the ChatRoomMessageReceivedEvent containing the newly received message, its sender and other details.

messageDelivered

public void messageDelivered(ChatRoomMessageDeliveredEvent evt)
Description copied from interface: ChatRoomMessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface ChatRoomMessageListener
Parameters:
evt - the ChatRoomMessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
Description copied from interface: ChatRoomMessageListener
Called to indicate that delivery of a message sent earlier to the chat room has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface ChatRoomMessageListener
Parameters:
evt - the ChatroomMessageDeliveryFailedEvent containing the ID of the message whose delivery has failed.

setHistoryService

public void setHistoryService(HistoryService historyService)
                       throws IllegalArgumentException,
                              IOException
Set the configuration service.

Parameters:
historyService - HistoryService
Throws:
IOException
IllegalArgumentException

unsetHistoryService

public void unsetHistoryService(HistoryService historyService)
Remove a configuration service.

Parameters:
historyService - HistoryService

serviceChanged

public void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
When new protocol provider is registered we check does it supports BasicIM and if so add a listener to it

Specified by:
serviceChanged in interface org.osgi.framework.ServiceListener
Parameters:
serviceEvent - ServiceEvent

localUserPresenceChanged

public void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
Called to notify interested parties that a change in our presence in a chat room has occured. Changes may include us being kicked, join, left.

Specified by:
localUserPresenceChanged in interface LocalUserChatRoomPresenceListener
Parameters:
evt - the LocalUserChatRoomPresenceChangeEvent instance containing the chat room and the type, and reason of the change

addSearchProgressListener

public void addSearchProgressListener(MessageHistorySearchProgressListener listener)
Adding progress listener for monitoring progress of search process

Specified by:
addSearchProgressListener in interface MessageHistoryService
Parameters:
listener - HistorySearchProgressListener

removeSearchProgressListener

public void removeSearchProgressListener(MessageHistorySearchProgressListener listener)
Removing progress listener

Specified by:
removeSearchProgressListener in interface MessageHistoryService
Parameters:
listener - HistorySearchProgressListener

findByPeriod

public Collection<EventObject> findByPeriod(MetaContact contact,
                                            Date startDate,
                                            Date endDate,
                                            String[] keywords,
                                            boolean caseSensitive)
                                     throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact between the given dates and having the given keywords

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
contact - MetaContact
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

public Collection<EventObject> findByKeyword(MetaContact contact,
                                             String keyword,
                                             boolean caseSensitive)
                                      throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keyword

Specified by:
findByKeyword in interface MessageHistoryService
Parameters:
contact - MetaContact
keyword - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

public Collection<EventObject> findByKeywords(MetaContact contact,
                                              String[] keywords,
                                              boolean caseSensitive)
                                       throws RuntimeException
Returns all the messages exchanged by all the contacts in the supplied metacontact having the given keywords

Specified by:
findByKeywords in interface MessageHistoryService
Parameters:
contact - MetaContact
keywords - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

countRecords

public int countRecords(Map<?,HistoryReader> readers)
Total count of records for supplied history readers will read through

Parameters:
readers - hashtable with pairs contact <-> history reader
Returns:
the number of searched messages
Throws:
UnsupportedOperationException - Thrown if an exception occurs during the execution of the query, such as internal IO error.

findByStartDate

public Collection<EventObject> findByStartDate(ChatRoom room,
                                               Date startDate)
                                        throws RuntimeException
Returns all the messages exchanged in the supplied chat room after the given date

Specified by:
findByStartDate in interface MessageHistoryService
Parameters:
room - The chat room
startDate - Date the start date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByEndDate

public Collection<EventObject> findByEndDate(ChatRoom room,
                                             Date endDate)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied chat room before the given date

Specified by:
findByEndDate in interface MessageHistoryService
Parameters:
room - The chat room
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

public Collection<EventObject> findByPeriod(ChatRoom room,
                                            Date startDate,
                                            Date endDate)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

public Collection<EventObject> findByPeriod(ChatRoom room,
                                            Date startDate,
                                            Date endDate,
                                            String[] keywords)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByPeriod

public Collection<EventObject> findByPeriod(ChatRoom room,
                                            Date startDate,
                                            Date endDate,
                                            String[] keywords,
                                            boolean caseSensitive)
                                     throws RuntimeException
Returns all the messages exchanged in the supplied chat room between the given dates and having the given keywords

Specified by:
findByPeriod in interface MessageHistoryService
Parameters:
room - The chat room
startDate - Date the start date of the conversations
endDate - Date the end date of the conversations
keywords - array of keywords
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

public Collection<EventObject> findByKeyword(ChatRoom room,
                                             String keyword)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied room having the given keyword

Specified by:
findByKeyword in interface MessageHistoryService
Parameters:
room - The Chat room
keyword - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeyword

public Collection<EventObject> findByKeyword(ChatRoom room,
                                             String keyword,
                                             boolean caseSensitive)
                                      throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keyword

Specified by:
findByKeyword in interface MessageHistoryService
Parameters:
room - The chat room
keyword - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

public Collection<EventObject> findByKeywords(ChatRoom room,
                                              String[] keywords)
                                       throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keywords

Specified by:
findByKeywords in interface MessageHistoryService
Parameters:
room - The chat room
keywords - keyword
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findByKeywords

public Collection<EventObject> findByKeywords(ChatRoom room,
                                              String[] keywords,
                                              boolean caseSensitive)
                                       throws RuntimeException
Returns all the messages exchanged in the supplied chat room having the given keywords

Specified by:
findByKeywords in interface MessageHistoryService
Parameters:
room - The chat room
keywords - keyword
caseSensitive - is keywords search case sensitive
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLast

public Collection<EventObject> findLast(ChatRoom room,
                                        int count)
                                 throws RuntimeException
Returns the supplied number of recent messages exchanged in the supplied chat room

Specified by:
findLast in interface MessageHistoryService
Parameters:
room - The chat room
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findFirstMessagesAfter

public Collection<EventObject> findFirstMessagesAfter(ChatRoom room,
                                                      Date date,
                                                      int count)
                                               throws RuntimeException
Returns the supplied number of recent messages after the given date exchanged in the supplied chat room

Specified by:
findFirstMessagesAfter in interface MessageHistoryService
Parameters:
room - The chat room
date - messages after date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

findLastMessagesBefore

public Collection<EventObject> findLastMessagesBefore(ChatRoom room,
                                                      Date date,
                                                      int count)
                                               throws RuntimeException
Returns the supplied number of recent messages before the given date exchanged in the supplied chat room

Specified by:
findLastMessagesBefore in interface MessageHistoryService
Parameters:
room - The chat room
date - messages before date
count - messages count
Returns:
Collection of MessageReceivedEvents or MessageDeliveredEvents
Throws:
RuntimeException

getResources

public static ResourceManagementService getResources()
Get ResourceManagementService registered.

Returns:
ResourceManagementService

messageDelivered

public void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called when the underlying implementation has received an indication that a message, sent earlier has been successfully received by the destination.

Specified by:
messageDelivered in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatRoomMessageDeliveredEvent containing the id of the message that has caused the event.

messageDeliveryFailed

public void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called to indicate that delivery of a message sent earlier to the chat room has failed. Reason code and phrase are contained by the MessageFailedEvent

Specified by:
messageDeliveryFailed in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatroomMessageDeliveryFailedEvent containing the ID of the message whose delivery has failed.

messageReceived

public void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
Description copied from interface: AdHocChatRoomMessageListener
Called when a new incoming Message has been received.

Specified by:
messageReceived in interface AdHocChatRoomMessageListener
Parameters:
evt - the AdHocChatRoomMessageReceivedEvent containing the newly received message, its sender and other details.

localUserAdHocPresenceChanged

public void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
Called to notify interested parties that a change in our presence in an ad-hoc chat room has occurred. Changes may include us being join, left.

Specified by:
localUserAdHocPresenceChanged in interface LocalUserAdHocChatRoomPresenceListener
Parameters:
evt - the LocalUserAdHocChatRoomPresenceChangeEvent instance containing the ad-hoc chat room and the type, and reason of the change

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.