protected void publishState(State from, State to) throws Exception {
    final Collection<StateListener> listeners = getStateListeners();
    synchronized (listeners) {
      for (StateListener listener : listeners) {
        listener.stateChanged(from, to);
      }
    }
  }
protected void publishState ( State from , State to ) throws Exception { final Collection < StateListener > listeners = getStateListeners ( ) ; synchronized ( listeners ) { for ( StateListener listener : listeners ) { listener . stateChanged ( from , to ) ; } } }
Propagates a change of {@link State} to all the
{@link StateListener}registered with this life cycle
object.

@see #changeState(State, State)

@param from the old state
@param to the new state
@throws Exception if a listener fails to accept the change