code: protected void notifyListeners(final Future<?> future) {
      final List<GenericCompletionListener<? extends Future<T>>> copy =
        new ArrayList<GenericCompletionListener<? extends Future<T>>>();
      synchronized(this) {
        copy.addAll(listeners);
        listeners = new ArrayList<GenericCompletionListener<? extends Future<T>>>();
      }
      for (GenericCompletionListener<? extends Future<? super T>> listener
        : copy) {
        notifyListener(executor(), future, listener);
      }
    }
docs: Notify all registered listeners with a special future on completion.
  
  This method can be used if a different future should be used for
  notification than the current one (for example if an enclosing future
  is used, but the enclosed future should be notified on).
  
  @param future the future to pass on to the listeners.