/**
   * Notifies the <tt>ContactQueryListener</tt>s registered with this <tt>ContactQuery</tt> that its
   * state has changed.
   *
   * @param eventType the type of the <tt>ContactQueryStatusEvent</tt> to be fired which can be one
   *     of the <tt>QUERY_XXX</tt> constants defined by <tt>ContactQueryStatusEvent</tt>
   */
  protected void fireQueryStatusChanged(int eventType) {
    ContactQueryListener[] ls;

    synchronized (listeners) {
      ls = listeners.toArray(new ContactQueryListener[listeners.size()]);
    }

    ContactQueryStatusEvent ev = new ContactQueryStatusEvent(this, eventType);

    for (ContactQueryListener l : ls) l.queryStatusChanged(ev);
  }