Interface for objects that may participate in a phased process such as lifecycle management.
An extension of the {@link Lifecycle} interface for those objects that require to be started upon ApplicationContext refresh and/or shutdown in a particular order. The {@link #isAutoStartup()} return value indicates whether this object should be started at the time of a context refresh. The callback-accepting {@link #stop(Runnable)} method is useful for objects that have an asynchronous shutdown process. Any implementation of this interface <i>must</i> invoke the callback's {@code run()} method upon shutdown completion to avoid unnecessary delays in the overall ApplicationContext shutdown.