T
- the very type of ContactSourceService which performs the
ContactQuerypublic abstract class AbstractContactQuery<T extends ContactSourceService> extends java.lang.Object implements ContactQuery
QUERY_CANCELED, QUERY_COMPLETED, QUERY_ERROR, QUERY_IN_PROGRESS
Modifier | Constructor and Description |
---|---|
protected |
AbstractContactQuery(T contactSource)
Initializes a new AbstractContactQuery which is to be performed
by a specific ContactSourceService.
|
Modifier and Type | Method and Description |
---|---|
void |
addContactQueryListener(ContactQueryListener l)
Adds a ContactQueryListener to the list of listeners interested
in notifications about this ContactQuery changing its status,
the receipt of new SourceContacts via this
ContactQuery, etc.
|
void |
cancel()
Cancels this ContactQuery.
|
protected void |
fireContactChanged(SourceContact contact)
Notifies the ContactQueryListeners registered with this
ContactQuery that a SourceContact has been
changed.
|
protected void |
fireContactReceived(SourceContact contact)
Notifies the ContactQueryListeners registered with this
ContactQuery that a new SourceContact has been
received.
|
protected void |
fireContactReceived(SourceContact contact,
boolean showMoreEnabled)
Notifies the ContactQueryListeners registered with this
ContactQuery that a new SourceContact has been
received.
|
protected void |
fireContactRemoved(SourceContact contact)
Notifies the ContactQueryListeners registered with this
ContactQuery that a SourceContact has been
removed.
|
protected void |
fireQueryStatusChanged(int eventType)
Notifies the ContactQueryListeners registered with this
ContactQuery that its state has changed.
|
T |
getContactSource()
Gets the ContactSourceService which is performing this
ContactQuery.
|
int |
getStatus()
Gets the status of this ContactQuery which can be one of the
QUERY_XXX constants defined by ContactQuery.
|
void |
removeContactQueryListener(ContactQueryListener l)
Removes a ContactQueryListener from the list of listeners
interested in notifications about this ContactQuery changing its
status, the receipt of new SourceContacts via this
ContactQuery, etc.
|
void |
setStatus(int status)
Sets the status of this ContactQuery.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getQueryResults, getQueryString, start
protected AbstractContactQuery(T contactSource)
ContactQuery.QUERY_IN_PROGRESS
.contactSource
- the ContactSourceService which is to
perform the new AbstractContactQuerypublic void addContactQueryListener(ContactQueryListener l)
addContactQueryListener
in interface ContactQuery
l
- the ContactQueryListener to be added to the list of
listeners interested in the notifications raised by this
ContactQueryContactQuery.addContactQueryListener(ContactQueryListener)
public void cancel()
cancel
in interface ContactQuery
ContactQuery.cancel()
protected void fireContactReceived(SourceContact contact, boolean showMoreEnabled)
contact
- the SourceContact which has been received and
which the registered ContactQueryListeners are to be notified
aboutshowMoreEnabled
- indicates whether show more label should be shown
or not.protected void fireContactReceived(SourceContact contact)
contact
- the SourceContact which has been received and
which the registered ContactQueryListeners are to be notified
aboutprotected void fireContactRemoved(SourceContact contact)
contact
- the SourceContact which has been removed and
which the registered ContactQueryListeners are to be notified
aboutprotected void fireContactChanged(SourceContact contact)
contact
- the SourceContact which has been changed and
which the registered ContactQueryListeners are to be notified
aboutprotected void fireQueryStatusChanged(int eventType)
eventType
- the type of the ContactQueryStatusEvent to be
fired which can be one of the QUERY_XXX constants defined by
ContactQueryStatusEventpublic T getContactSource()
getContactSource
in interface ContactQuery
ContactQuery.getContactSource()
public int getStatus()
getStatus
in interface ContactQuery
ContactQuery.getStatus()
public void removeContactQueryListener(ContactQueryListener l)
removeContactQueryListener
in interface ContactQuery
l
- the ContactQueryListener to be removed from the list of
listeners interested in notifications raised by this ContactQueryContactQuery.removeContactQueryListener(ContactQueryListener)
public void setStatus(int status)
status
- ContactQuery.QUERY_CANCELED
,
ContactQuery.QUERY_COMPLETED
, or
ContactQuery.QUERY_ERROR
Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under Apache license.