Package org.osgi.application
Class Framework
java.lang.Object
org.osgi.application.Framework
Using this class, OSGi-aware applications can obtain their
ApplicationContext.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ApplicationContextgetApplicationContext(Object applicationInstance) This method needs an argument, an object that represents the application instance.
-
Field Details
-
appContextHash
-
-
Constructor Details
-
Framework
private Framework()
-
-
Method Details
-
getApplicationContext
This method needs an argument, an object that represents the application instance. An application consists of a set of object, however there is a single object, which is used by the corresponding application container to manage the lifecycle on the application instance. The lifetime of this object equals the lifetime of the application instance; therefore, it is suitable to represent the instance.The returned
ApplicationContextobject is singleton for the specified application instance. Subsequent calls to this method with the same application instance must return the same context object- Parameters:
applicationInstance- is the activator object of an application instance- Returns:
- the
ApplicationContextof the specified application instance. - Throws:
NullPointerException- IfapplicationInstanceisnullIllegalArgumentException- if called with an object that is not the activator object of an application.
-