protected boolean dispatchBatch(List events) throws GatewaySenderException {
    if (events.isEmpty()) {
      return true;
    }
    int batchId = eventProcessor.getBatchId();
    boolean successAll = true;
    try {
      for (AsyncEventListener listener : eventListeners) {
        boolean successOne = listener.processEvents(events);
        if (!successOne) {
          successAll = false;
        }
      }
    } catch (Exception e) {
      final String alias =
          "%s: Exception during processing batch %s";
      final Object[] aliasArgs = new Object[] {this, batchId};
      String exMsg = String.format(alias, aliasArgs);
      GatewaySenderException ge = new GatewaySenderException(exMsg, e);
      logger.warn(exMsg, ge);
      throw ge;
    }
    return successAll;
  }
Sends a batch of messages to the registered <code>AsyncEventListener</code>s.

@param events The <code>List</code> of events to send
geode-core/src/main/java/org/apache/geode/internal/cache/wan/GatewaySenderEventCallbackDispatcher.java