com.ibm.wsspi.kernel.service.utils
Class FrameworkState
- java.lang.Object
com.ibm.wsspi.kernel.service.utils.FrameworkState
- public class FrameworkState
- extends java.lang.Object
The OSGi framework system bundle is the single best indicator of when the framework is in the process of stopping: OSGi stop semantics dictate that the framework change the system bundle's state to STOPPING before it begins stopping bundles.
The interrelationship between declared services (DS or Blueprint) means that service A might be deactivated because a service it requires from another bundle has gone away (because that bundle has stopped) before its own bundle has stopped.
This utility can be used to curtail scheduling additional asynchronous work if the framework is stopping.
Constructor Summary
Constructor and Description |
---|
FrameworkState()
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
isStopping()
|
|
isValid()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail
FrameworkState
- public FrameworkState()
Method Detail
isValid
- public static boolean isValid()
Returns:
True if the framework is in a viable running state.
Will return true when called outside of the osgi environment
isStopping
- public static boolean isStopping( )
Returns:
True if the framework is in the process of stopping,
or has already stopped. If this method is called outside
of an OSGi context, it will return false.