The technique by which the framework refreshes bundles may vary among different framework implementations. A permissible implementation is to stop and restart the framework.
This method returns to the caller immediately and then performs the following steps on a separate thread:
For any exceptions that are thrown during any of these steps, a framework event of type {@code FrameworkEvent.ERROR} is fired containing theexception. The source bundle for these events should be the specific bundle to which the exception is related. If no specific bundle can be associated with the exception then the System Bundle must be used as the source bundle for the event. All framework events fired by this method are also delivered to the specified {@code FrameworkListener}s in the order they are specified.
When this process completes after the bundles are refreshed, the Framework will fire a Framework event of type {@code FrameworkEvent.PACKAGES_REFRESHED} to announce it has completedthe bundle refresh. The specified {@code FrameworkListener}s are notified in the order specified. Each specified {@code FrameworkListener} will becalled with a Framework event of type {@code FrameworkEvent.PACKAGES_REFRESHED}. @param bundles The bundles to be refreshed, or {@code null} to refreshthe {@link #getRemovalPendingBundles() removal pending} bundles. @param listeners Zero or more listeners to be notified when the bundlerefresh has been completed. The specified listeners do not need to be otherwise registered with the framework. If a specified listener is already registered with the framework, it will be notified twice. @throws IllegalArgumentException If the specified {@code Bundle}s were not created by the same framework instance associated with this FrameworkWiring. @throws SecurityException If the caller does not have{@code AdminPermission[System Bundle,RESOLVE]} and the Javaruntime environment supports permissions.
|
|
|
|