SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.callhistory
Class CallHistoryQueryImpl

java.lang.Object
  extended by net.java.sip.communicator.impl.callhistory.CallHistoryQueryImpl
All Implemented Interfaces:
CallHistoryQuery

public class CallHistoryQueryImpl
extends Object
implements CallHistoryQuery

Author:
Yana Stamcheva

Constructor Summary
CallHistoryQueryImpl(HistoryQuery query)
          Creates an instance of CallHistoryQueryImpl by specifying the underlying HistoryQuery.
 
Method Summary
 void addQueryListener(CallHistoryQueryListener l)
          Adds the given CallHistoryQueryListener to the list of listeners interested in query result changes.
 void cancel()
          Cancels this query.
 Collection<CallRecord> getCallRecords()
          Returns a collection of the results for this query.
 void removeQueryListener(CallHistoryQueryListener l)
          Removes the given CallHistoryQueryListener from the list of listeners interested in query result changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CallHistoryQueryImpl

public CallHistoryQueryImpl(HistoryQuery query)
Creates an instance of CallHistoryQueryImpl by specifying the underlying HistoryQuery.

Parameters:
query - the underlying HistoryQuery this query is based on
Method Detail

cancel

public void cancel()
Cancels this query.

Specified by:
cancel in interface CallHistoryQuery

getCallRecords

public Collection<CallRecord> getCallRecords()
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 CallHistoryQueryListener, which should improve user experience when waiting for results.

Specified by:
getCallRecords in interface CallHistoryQuery
Returns:
a collection of the initial results for this query

addQueryListener

public void addQueryListener(CallHistoryQueryListener l)
Adds the given CallHistoryQueryListener to the list of listeners interested in query result changes.

Specified by:
addQueryListener in interface CallHistoryQuery
Parameters:
l - the CallHistoryQueryListener to add

removeQueryListener

public void removeQueryListener(CallHistoryQueryListener l)
Removes the given CallHistoryQueryListener from the list of listeners interested in query result changes.

Specified by:
removeQueryListener in interface CallHistoryQuery
Parameters:
l - the CallHistoryQueryListener to remove

SIP Communicator: the OpenSource Java VoIP and Instant Messaging client.

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