Stop this Framework.
The method returns immediately to the caller after initiating the following steps to be taken on another thread.
- This Framework's state is set to {@link #STOPPING}.
- All installed bundles must be stopped without changing each bundle's persistent autostart setting. The start level of this Framework is moved to start level zero (0), as described in the Start Level Specification. Any exceptions that occur during bundle stopping must be wrapped in a {@link BundleException} and then published as a frameworkevent of type {@link FrameworkEvent#ERROR}
- Unregister all services registered by this Framework.
- Event handling is disabled.
- This Framework's state is set to {@link #RESOLVED}.
- All resources held by this Framework are released. This includes threads, bundle class loaders, open files, etc.
- Notify all threads that are waiting at {@link #waitForStop(long) waitForStop} that the stop operation has completed.
After being stopped, this Framework may be discarded, initialized or started.
@throws BundleException If stopping this Framework could not beinitiated.
@throws SecurityException If the caller does not have the appropriate{@code AdminPermission[this,EXECUTE]}, and the Java Runtime Environment supports permissions.
@see "Start Level Specification"