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

@param listener
@throws IllegalArgumentException if listener is null