|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.ungoverned.oscar.StartLevelImpl
public class StartLevelImpl
| Constructor Summary | |
|---|---|
StartLevelImpl(Oscar oscar)
|
|
| Method Summary | |
|---|---|
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. |
int |
getStartLevel()
Return the active start level value of the Framework. |
boolean |
isBundlePersistentlyStarted(Bundle bundle)
Return the persistent state of the specified bundle. |
void |
run()
|
void |
setBundleStartLevel(Bundle bundle,
int startlevel)
Assign a start level value to the specified Bundle. |
void |
setInitialBundleStartLevel(int startlevel)
Set the initial start level value that is assigned to a Bundle when it is first installed. |
void |
setStartLevel(int startlevel)
Modify the active start level of the Framework. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StartLevelImpl(Oscar oscar)
| Method Detail |
|---|
public int getStartLevel()
StartLevel
getStartLevel in interface StartLevelpublic void setStartLevel(int startlevel)
StartLevelThe Framework will move to the requested start level. This method will return immediately to the caller and the start level change will occur asynchronously on another thread.
If the specified start level is higher than the active start level, the Framework will continue to increase the start level until the Framework has reached the specified start level, starting bundles at each start level which are persistently marked to be started as described in the Bundle.start method. At each intermediate start level value on the way to and including the target start level, the framework must:
If the specified start level is lower than the active start level, the Framework will continue to decrease the start level until the Framework has reached the specified start level stopping bundles at each start level as described in the Bundle.stop method except that their persistently recorded state indicates that they must be restarted in the future. At each intermediate start level value on the way to and including the specified start level, the framework must:
If the specified start level is equal to the active start level, then no bundles are started or stopped, however, the Framework must broadcast a Framework event of type FrameworkEvent.STARTLEVEL_CHANGED to announce it has finished moving to the specified start level. This event may arrive before the this method return.
setStartLevel in interface StartLevelstartlevel - The requested start level for the Framework.public int getBundleStartLevel(Bundle bundle)
StartLevel
getBundleStartLevel in interface StartLevelbundle - The target bundle.
public void setBundleStartLevel(Bundle bundle,
int startlevel)
StartLevelThe specified 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, the Framework will start the specified bundle as described in the Bundle.start method if the bundle is persistently marked to be started. The actual starting of this 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 specified bundle as described in the Bundle.stop method except that the persistently recorded state for the bundle indicates that the bundle must be restarted in the future. The actual stopping of this bundle must occur asynchronously.
setBundleStartLevel in interface StartLevelbundle - The target bundle.startlevel - The new start level for the specified Bundle.public int getInitialBundleStartLevel()
StartLevel
getInitialBundleStartLevel in interface StartLevelStartLevel.setInitialBundleStartLevel(int)public void setInitialBundleStartLevel(int startlevel)
StartLevelThe 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.
setInitialBundleStartLevel in interface StartLevelstartlevel - The initial start level for newly installed bundles.public boolean isBundlePersistentlyStarted(Bundle bundle)
StartLevelThis 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.
isBundlePersistentlyStarted in interface StartLevelpublic void run()
run in interface java.lang.Runnable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||