code: public Listener<T> add(Consumer<T> listener) {
      Assert.notNull(listener, "listener");
      ListenerHolder holder = new ListenerHolder(listener, ThreadContext.currentContext());
      listeners.add(holder);
      return holder;
    }
docs: Adds a listener to the set of listeners.
  
  @param listener The listener to add.
  @return The listener context.
  @throws NullPointerException if {@code listener} is null