This graphic illustrates the different plug-in states (NEW, STARTED, ACTIVE (admin) and ACTIVE (running)) and the transitions you use to go from state to state.
To transition from NEW to STARTED use the doStarted() transition.
To transition from STARTED to NEW use the doStopped() transition.
To transition from STARTED to ACTIVE (admin) use the doActivated() transition.
To transition from ACTIVE (admin) to STARTED you use the doDeactivated() transition.
To transition from ACTIVE (admin) to ACTIVE (running), you use the handleResuming transition.
To transition from ACTIVE (running) to ACTIVE (admin), you use the handleSuspending() or handleForceSuspending() transition.
To transition from NEW to ACTIVE, use the activate() transition.
To transition from ACTIVE to NEW, use the deactivate() transition.