public void registerAsyncEventListener(AsyncEventListener listener) {
    synchronized (eventLock) {
      List<AsyncEventListener> oldListeners = eventListeners;
      if (!oldListeners.contains(listener)) {
        List<AsyncEventListener> newListeners = new ArrayList<>(oldListeners);
        newListeners.add(listener);
        eventListeners = newListeners;
      }
    }
  }
Registers a <code>AsyncEventListener</code>.

@param listener A AsyncEventListener to be registered
geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventCallbackDispatcher.java