Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.service.history
Interface HistoryQuery

All Known Implementing Classes:
HistoryQueryImpl

public interface HistoryQuery

The HistoryQuery corresponds to a query made through the InteractiveHistoryReader. It allows to be canceled, to listen for changes in the results and to obtain initial results if available.

Author:
Yana Stamcheva

Method Summary
 void addHistoryRecordsListener(HistoryQueryListener l)
          Adds the given HistoryQueryListener to the list of listeners interested in query result changes.
 void cancel()
          Cancels this query.
 Collection<HistoryRecord> getHistoryRecords()
          Returns a collection of the results for this query.
 String getQueryString()
          Returns the query string, this query was created for.
 void removeHistoryRecordsListener(HistoryQueryListener l)
          Removes the given HistoryQueryListener from the list of listeners interested in query result changes.
 

Method Detail

cancel

void cancel()
Cancels this query.


getQueryString

String getQueryString()
Returns the query string, this query was created for.

Returns:
the query string, this query was created for

getHistoryRecords

Collection<HistoryRecord> getHistoryRecords()
Returns a collection of the results for this query. It's up to the implementation to determine how and when to fill this list of results.

This method could be used in order to obtain first fast initial results and then obtain the additional results through the HistoryQueryListener, which should improve user experience when waiting for results.

Returns:
a collection of the initial results for this query

addHistoryRecordsListener

void addHistoryRecordsListener(HistoryQueryListener l)
Adds the given HistoryQueryListener to the list of listeners interested in query result changes.

Parameters:
l - the HistoryQueryListener to add

removeHistoryRecordsListener

void removeHistoryRecordsListener(HistoryQueryListener l)
Removes the given HistoryQueryListener from the list of listeners interested in query result changes.

Parameters:
l - the HistoryQueryListener to remove

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

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