* Copyright (c) OSGi Alliance (2010). All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
bundle.adapt(BundleStartLevel.class)on the bundle.
The bundle associated with this BundleStartLevel object can be obtained by
The bundle will be assigned the specified start level. The start level value assigned to the bundle will be persistently recorded by the Framework.
If the new start level for the bundle is lower than or equal to the
active start level of the Framework and the bundle's autostart setting
indicates this bundle must be started, the Framework will start the
bundle as described in the
method using the
option must also be used if
true. The actual
starting of the bundle must occur asynchronously.
If the new start level for the bundle is higher than the active start
level of the Framework, the Framework will stop the bundle as described
method using the
option. The actual stopping of the bundle
must occur asynchronously.
startlevelThe new start level for the bundle.
java.lang.IllegalArgumentExceptionIf the specified start level is less than or equal to zero, or if the bundle is the system bundle.
java.lang.IllegalStateExceptionIf the bundle has been uninstalled.
java.lang.SecurityExceptionIf the caller does not have
AdminPermission[bundle,EXECUTE]and the Java runtime environment supports permissions.
The autostart setting of a bundle indicates whether the bundle is to be started when its start level is reached.
The autostart setting of a bundle indicates whether the bundle's declared activation policy is to be used when the bundle is started.