public void initCqListeners(CqListener[] cqListeners) {
    if (cqListeners == null || cqListeners.length == 0) {
      cqAttributes.setCqListeners(null);
    } else {
      List nl = Arrays.asList(cqListeners);
      if (nl.contains(null)) {
        throw new IllegalArgumentException(
            "initCqListeners parameter had a null element");
      }
      cqAttributes.setCqListeners(new ArrayList(nl));
    }
  }
Removes all Cq listeners and then adds each listener in the specified array.

@param cqListeners a possibly null or empty array of listeners to add to this factory.
@throws IllegalArgumentException if the <code>cqListeners</code> array has a null element
geode-core/src/main/java/org/apache/geode/cache/query/CqAttributesFactory.java