code: public synchronized void addStateListener(@Nonnull EndpointStateListener<VALUE_TYPE, ARG_TYPE> listener) throws IllegalArgumentException {
          checkListenerNonNull(listener);
          fieldStateListeners.add(listener);
          if (informStateListenerOnAdd) {
              informStateListener(getStateAndValue(), listener);
          }
      }
docs: Register listener that will be informed each time {@link FieldState}
  changes.
  
  @param listener
  @throws IllegalArgumentException if listener is null