|
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 | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.msghistory.MessageHistoryServiceImpl
public class MessageHistoryServiceImpl
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).
| 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 |
|---|
public MessageHistoryServiceImpl()
| Method Detail |
|---|
public HistoryService getHistoryService()
public Collection<EventObject> findByStartDate(MetaContact contact,
Date startDate)
throws RuntimeException
findByStartDate in interface MessageHistoryServicecontact - MetaContactstartDate - Date the start date of the conversations
RuntimeException
public Collection<EventObject> findByEndDate(MetaContact contact,
Date endDate)
throws RuntimeException
findByEndDate in interface MessageHistoryServicecontact - MetaContactendDate - Date the end date of the conversations
RuntimeException
public Collection<EventObject> findByPeriod(MetaContact contact,
Date startDate,
Date endDate)
throws RuntimeException
findByPeriod in interface MessageHistoryServicecontact - MetaContactstartDate - Date the start date of the conversationsendDate - Date the end date of the conversations
RuntimeException
public Collection<EventObject> findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords)
throws RuntimeException
findByPeriod in interface MessageHistoryServicecontact - MetaContactstartDate - Date the start date of the conversationsendDate - Date the end date of the conversationskeywords - array of keywords
RuntimeException
public Collection<EventObject> findByKeyword(MetaContact contact,
String keyword)
throws RuntimeException
findByKeyword in interface MessageHistoryServicecontact - MetaContactkeyword - keyword
RuntimeException
public Collection<EventObject> findByKeywords(MetaContact contact,
String[] keywords)
throws RuntimeException
findByKeywords in interface MessageHistoryServicecontact - MetaContactkeywords - keyword
RuntimeException
public Collection<EventObject> findLast(MetaContact contact,
int count)
throws RuntimeException
findLast in interface MessageHistoryServicecontact - MetaContactcount - messages count
RuntimeException
public Collection<EventObject> findFirstMessagesAfter(MetaContact contact,
Date date,
int count)
throws RuntimeException
findFirstMessagesAfter in interface MessageHistoryServicecontact - MetaContactdate - messages after datecount - messages count
RuntimeException
public Collection<EventObject> findLastMessagesBefore(MetaContact contact,
Date date,
int count)
throws RuntimeException
findLastMessagesBefore in interface MessageHistoryServicecontact - MetaContactdate - messages before datecount - messages count
RuntimeExceptionpublic void start(org.osgi.framework.BundleContext bc)
bc - BundleContextpublic void stop(org.osgi.framework.BundleContext bc)
bc - BundleContextpublic void messageReceived(MessageReceivedEvent evt)
MessageListener
messageReceived in interface MessageListenerevt - the MessageReceivedEvent containing the newly
received message, its sender and other details.public void messageDelivered(MessageDeliveredEvent evt)
MessageListener
messageDelivered in interface MessageListenerevt - the MessageDeliveredEvent containing the id of the message
that has caused the event.public void messageDeliveryFailed(MessageDeliveryFailedEvent evt)
MessageListener
messageDeliveryFailed in interface MessageListenerevt - the MessageFailedEvent containing the ID of the
message whose delivery has failed.public void messageReceived(ChatRoomMessageReceivedEvent evt)
ChatRoomMessageListener
messageReceived in interface ChatRoomMessageListenerevt - the ChatRoomMessageReceivedEvent containing the newly
received message, its sender and other details.public void messageDelivered(ChatRoomMessageDeliveredEvent evt)
ChatRoomMessageListener
messageDelivered in interface ChatRoomMessageListenerevt - the ChatRoomMessageDeliveredEvent containing the id
of the message that has caused the event.public void messageDeliveryFailed(ChatRoomMessageDeliveryFailedEvent evt)
ChatRoomMessageListener
messageDeliveryFailed in interface ChatRoomMessageListenerevt - the ChatroomMessageDeliveryFailedEvent containing
the ID of the message whose delivery has failed.
public void setHistoryService(HistoryService historyService)
throws IllegalArgumentException,
IOException
historyService - HistoryService
IOException
IllegalArgumentExceptionpublic void unsetHistoryService(HistoryService historyService)
historyService - HistoryServicepublic void serviceChanged(org.osgi.framework.ServiceEvent serviceEvent)
serviceChanged in interface org.osgi.framework.ServiceListenerserviceEvent - ServiceEventpublic void localUserPresenceChanged(LocalUserChatRoomPresenceChangeEvent evt)
localUserPresenceChanged in interface LocalUserChatRoomPresenceListenerevt - the LocalUserChatRoomPresenceChangeEvent instance
containing the chat room and the type, and reason of the changepublic void addSearchProgressListener(MessageHistorySearchProgressListener listener)
addSearchProgressListener in interface MessageHistoryServicelistener - HistorySearchProgressListenerpublic void removeSearchProgressListener(MessageHistorySearchProgressListener listener)
removeSearchProgressListener in interface MessageHistoryServicelistener - HistorySearchProgressListener
public Collection<EventObject> findByPeriod(MetaContact contact,
Date startDate,
Date endDate,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByPeriod in interface MessageHistoryServicecontact - MetaContactstartDate - Date the start date of the conversationsendDate - Date the end date of the conversationskeywords - array of keywordscaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<EventObject> findByKeyword(MetaContact contact,
String keyword,
boolean caseSensitive)
throws RuntimeException
findByKeyword in interface MessageHistoryServicecontact - MetaContactkeyword - keywordcaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<EventObject> findByKeywords(MetaContact contact,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByKeywords in interface MessageHistoryServicecontact - MetaContactkeywords - keywordcaseSensitive - is keywords search case sensitive
RuntimeExceptionpublic int countRecords(Map<?,HistoryReader> readers)
readers - hashtable with pairs contact <-> history reader
UnsupportedOperationException - Thrown if an exception occurs during the execution of the
query, such as internal IO error.
public Collection<EventObject> findByStartDate(ChatRoom room,
Date startDate)
throws RuntimeException
findByStartDate in interface MessageHistoryServiceroom - The chat roomstartDate - Date the start date of the conversations
RuntimeException
public Collection<EventObject> findByEndDate(ChatRoom room,
Date endDate)
throws RuntimeException
findByEndDate in interface MessageHistoryServiceroom - The chat roomendDate - Date the end date of the conversations
RuntimeException
public Collection<EventObject> findByPeriod(ChatRoom room,
Date startDate,
Date endDate)
throws RuntimeException
findByPeriod in interface MessageHistoryServiceroom - The chat roomstartDate - Date the start date of the conversationsendDate - Date the end date of the conversations
RuntimeException
public Collection<EventObject> findByPeriod(ChatRoom room,
Date startDate,
Date endDate,
String[] keywords)
throws RuntimeException
findByPeriod in interface MessageHistoryServiceroom - The chat roomstartDate - Date the start date of the conversationsendDate - Date the end date of the conversationskeywords - array of keywords
RuntimeException
public Collection<EventObject> findByPeriod(ChatRoom room,
Date startDate,
Date endDate,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByPeriod in interface MessageHistoryServiceroom - The chat roomstartDate - Date the start date of the conversationsendDate - Date the end date of the conversationskeywords - array of keywordscaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<EventObject> findByKeyword(ChatRoom room,
String keyword)
throws RuntimeException
findByKeyword in interface MessageHistoryServiceroom - The Chat roomkeyword - keyword
RuntimeException
public Collection<EventObject> findByKeyword(ChatRoom room,
String keyword,
boolean caseSensitive)
throws RuntimeException
findByKeyword in interface MessageHistoryServiceroom - The chat roomkeyword - keywordcaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<EventObject> findByKeywords(ChatRoom room,
String[] keywords)
throws RuntimeException
findByKeywords in interface MessageHistoryServiceroom - The chat roomkeywords - keyword
RuntimeException
public Collection<EventObject> findByKeywords(ChatRoom room,
String[] keywords,
boolean caseSensitive)
throws RuntimeException
findByKeywords in interface MessageHistoryServiceroom - The chat roomkeywords - keywordcaseSensitive - is keywords search case sensitive
RuntimeException
public Collection<EventObject> findLast(ChatRoom room,
int count)
throws RuntimeException
findLast in interface MessageHistoryServiceroom - The chat roomcount - messages count
RuntimeException
public Collection<EventObject> findFirstMessagesAfter(ChatRoom room,
Date date,
int count)
throws RuntimeException
findFirstMessagesAfter in interface MessageHistoryServiceroom - The chat roomdate - messages after datecount - messages count
RuntimeException
public Collection<EventObject> findLastMessagesBefore(ChatRoom room,
Date date,
int count)
throws RuntimeException
findLastMessagesBefore in interface MessageHistoryServiceroom - The chat roomdate - messages before datecount - messages count
RuntimeExceptionpublic static ResourceManagementService getResources()
public void messageDelivered(AdHocChatRoomMessageDeliveredEvent evt)
AdHocChatRoomMessageListener
messageDelivered in interface AdHocChatRoomMessageListenerevt - the AdHocChatRoomMessageDeliveredEvent containing the
id of the message that has caused the event.public void messageDeliveryFailed(AdHocChatRoomMessageDeliveryFailedEvent evt)
AdHocChatRoomMessageListener
messageDeliveryFailed in interface AdHocChatRoomMessageListenerevt - the AdHocChatroomMessageDeliveryFailedEvent
containing the ID of the message whose delivery has failed.public void messageReceived(AdHocChatRoomMessageReceivedEvent evt)
AdHocChatRoomMessageListener
messageReceived in interface AdHocChatRoomMessageListenerevt - the AdHocChatRoomMessageReceivedEvent containing the
newly received message, its sender and other details.public void localUserAdHocPresenceChanged(LocalUserAdHocChatRoomPresenceChangeEvent evt)
localUserAdHocPresenceChanged in interface LocalUserAdHocChatRoomPresenceListenerevt - 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. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||