docs: public synchronized void addShutdownListener(ShutdownListener listener) {
          if (state == CLOSED) {
              listener.handleCompleted();
          } else {
              listeners.add(listener);
          }
      }