Wait until this Framework has completely stopped. The {@code stop} and{@code update} methods on a Framework performs an asynchronous stop ofthe Framework. This method can be used to wait until the asynchronous stop of this Framework has completed. This method will only wait if called when this Framework is in the {@link #STARTING}, {@link #ACTIVE}, or {@link #STOPPING} states. Otherwise it will return immediately.
A Framework Event is returned to indicate why this Framework has stopped.
@param timeout Maximum number of milliseconds to wait until thisFramework has completely stopped. A value of zero will wait indefinitely.
@return A Framework Event indicating the reason this method returned. Thefollowing {@code FrameworkEvent} types may be returned by thismethod.
- {@link FrameworkEvent#STOPPED STOPPED} - This Framework hasbeen stopped.
- {@link FrameworkEvent#STOPPED_UPDATE STOPPED_UPDATE} - ThisFramework has been updated which has shutdown and will now restart.
- {@link FrameworkEvent#STOPPED_BOOTCLASSPATH_MODIFIED STOPPED_BOOTCLASSPATH_MODIFIED} - This Framework has been stoppedand a bootclasspath extension bundle has been installed or updated. The VM must be restarted in order for the changed boot class path to take effect.
- {@link FrameworkEvent#ERROR ERROR} - The Frameworkencountered an error while shutting down or an error has occurred which forced the framework to shutdown.
- {@link FrameworkEvent#WAIT_TIMEDOUT WAIT_TIMEDOUT} - Thismethod has timed out and returned before this Framework has stopped.
@throws InterruptedException If another thread interrupted the currentthread before or while the current thread was waiting for this Framework to completely stop. The
interrupted status of the current thread is cleared when this exception is thrown.
@throws IllegalArgumentException If the value of timeout is negative.