Definition at line 50 of file StartLevelImpl.java.
Public Member Functions | |
int | getStartLevel () |
Return the active start level value of the Framework. | |
int | getBundleStartLevel (Bundle bundle) |
Return the assigned start level value for the specified Bundle. | |
int | getInitialBundleStartLevel () |
Return the initial start level value that is assigned to a Bundle when it is first installed. | |
void | setInitialBundleStartLevel (int startLevel) |
Set the initial start level value that is assigned to a Bundle when it is first installed. | |
boolean | isBundlePersistentlyStarted (Bundle bundle) |
Return the persistent state of the specified bundle. | |
Package Functions | |
void | restoreState () |
Load persistent state from storage and set up all actions necessary to bump bundle states. |
void org.knopflerfish.framework.StartLevelImpl.restoreState | ( | ) | [package] |
Load persistent state from storage and set up all actions necessary to bump bundle states.
After this call, getStartLevel will have the correct value.
Note that open() needs to be called for any work to be done.
Definition at line 120 of file StartLevelImpl.java.
int org.knopflerfish.framework.StartLevelImpl.getStartLevel | ( | ) |
Return the active start level value of the Framework.
If the Framework is in the process of changing the start level this method must return the active start level if this differs from the requested start level.
Implements org.osgi.service.startlevel.StartLevel.
Definition at line 183 of file StartLevelImpl.java.
Referenced by org.knopflerfish.framework.BundleImpl.start().
int org.knopflerfish.framework.StartLevelImpl.getBundleStartLevel | ( | Bundle | bundle | ) |
Return the assigned start level value for the specified Bundle.
bundle | The target bundle. |
java.lang.IllegalArgumentException | If the specified bundle has been uninstalled. |
Implements org.osgi.service.startlevel.StartLevel.
Definition at line 346 of file StartLevelImpl.java.
References org.osgi.framework.Bundle.getBundleId(), and org.knopflerfish.framework.BundleImpl.getStartLevel().
int org.knopflerfish.framework.StartLevelImpl.getInitialBundleStartLevel | ( | ) |
Return the initial start level value that is assigned to a Bundle when it is first installed.
Implements org.osgi.service.startlevel.StartLevel.
Definition at line 419 of file StartLevelImpl.java.
Referenced by org.knopflerfish.framework.BundleImpl.BundleImpl().
void org.knopflerfish.framework.StartLevelImpl.setInitialBundleStartLevel | ( | int | startlevel | ) |
Set the initial start level value that is assigned to a Bundle when it is first installed.
The initial bundle start level will be set to the specified start level. The initial bundle start level value will be persistently recorded by the Framework.
When a Bundle is installed via BundleContext.installBundle
, it is assigned the initial bundle start level value.
The default initial bundle start level value is 1 unless this method has been called to assign a different initial bundle start level value.
Thie method does not change the start level values of installed bundles.
startlevel | The initial start level for newly installed bundles. |
IllegalArgumentException | If the specified start level is less than or equal to zero. | |
SecurityException | If the caller does not have AdminPermission[System Bundle,STARTLEVEL] and the Java runtime environment supports permissions. |
Implements org.osgi.service.startlevel.StartLevel.
Definition at line 424 of file StartLevelImpl.java.
References org.knopflerfish.framework.PermissionOps.checkStartLevelAdminPerm(), and org.knopflerfish.framework.Framework.perm.
boolean org.knopflerfish.framework.StartLevelImpl.isBundlePersistentlyStarted | ( | Bundle | bundle | ) |
Return the persistent state of the specified bundle.
This method returns the persistent state of a bundle. The persistent state of a bundle indicates whether a bundle is persistently marked to be started when it's start level is reached.
bundle | The bundle for which to return the persistently started state. |
true
if the bundle is persistently marked to be started, false
if the bundle is not persistently marked to be started. java.lang.IllegalArgumentException | If the specified bundle has been uninstalled. |
Implements org.osgi.service.startlevel.StartLevel.
Definition at line 434 of file StartLevelImpl.java.