@Override
  public CacheListener getCacheListener() {
    CacheListener[] listeners = getCacheListeners();
    if (listeners.length == 0) {
      return null;
    } else if (listeners.length == 1) {
      return listeners[0];
    } else {
      throw new IllegalStateException(
          "More than one cache listener exists.");
    }
  }
For use only by DataExternalizable mechanism
geode-core/src/main/java/org/apache/geode/internal/admin/remote/RemoteRegionAttributes.java