on State Changed
Called when a state change occurs.
This method should be fast and non-blocking. If heavy processing is required, it should be performed asynchronously.
Observers should be resilient to exceptions - an exception in one observer should not affect other observers or the state transition.
Parameters
old State
The previous state before the change
new State
The new state after the change