BundleEvent objects are delivered to
SynchronousBundleListeners and BundleListeners when a change
occurs in a bundle's lifecycle. A type code is used to identify the event
type for future extendability.
OSGi Alliance reserves the right to extend the set of types.
BundleListener, SynchronousBundleListener
| Modifier and Type | Field and Description |
|---|---|
| private final Bundle | bundle
Bundle that had a change occur in its lifecycle. |
| public static final int | INSTALLED
The bundle has been installed. |
| public static final int | LAZY_ACTIVATION
The bundle will be lazily activated. |
| private final Bundle | origin
Bundle that was the origin of the event. |
| public static final int | RESOLVED
The bundle has been resolved. |
| pack-priv static final long | |
| public static final int | STARTED
The bundle has been started. |
| public static final int | STARTING
The bundle is about to be activated. |
| public static final int | STOPPED
The bundle has been stopped. |
| public static final int | STOPPING
The bundle is about to deactivated. |
| private final int | type
Type of bundle lifecycle change. |
| public static final int | UNINSTALLED
The bundle has been uninstalled. |
| public static final int | UNRESOLVED
The bundle has been unresolved. |
| public static final int | UPDATED
The bundle has been updated. |
| Access | Constructor and Description |
|---|---|
| public | BundleEvent(int
The event type. type, Bundle The bundle which had a lifecycle change. bundle, Bundle The bundle which is the origin of the event. For the event
type origin)INSTALLED, this is the bundle whose context was used
to install the bundle. Otherwise it is the bundle itself.Creates a bundle event of the specified type. |
| public | BundleEvent(int
The event type. type, Bundle The bundle which had a lifecycle change. This bundle is
used as the origin of the event. bundle)Creates a bundle event of the specified type. |
| Modifier and Type | Method and Description |
|---|---|
| public Bundle | Returns: The bundle that had a change occur in its lifecycle.Returns the bundle which had a lifecycle change. |
| public Bundle | Returns: The bundle that was the origin of the event.Returns the bundle that was the origin of the event. |
| public int |
| bundle | back to summary |
|---|---|
| private final Bundle bundle Bundle that had a change occur in its lifecycle. | |
| INSTALLED | back to summary |
|---|---|
| public static final int INSTALLED The bundle has been installed.
| |
| LAZY_ACTIVATION | back to summary |
|---|---|
| public static final int LAZY_ACTIVATION The bundle will be lazily activated.
The bundle has a
| |
| origin | back to summary |
|---|---|
| private final Bundle origin Bundle that was the origin of the event. For install event type, this is the bundle whose context was used to install the bundle. Otherwise it is the bundle itself.
| |
| RESOLVED | back to summary |
|---|---|
| public static final int RESOLVED The bundle has been resolved.
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| STARTED | back to summary |
|---|---|
| public static final int STARTED The bundle has been started.
The bundle's
| |
| STARTING | back to summary |
|---|---|
| public static final int STARTING The bundle is about to be activated.
The bundle's
| |
| STOPPED | back to summary |
|---|---|
| public static final int STOPPED The bundle has been stopped.
The bundle's
| |
| STOPPING | back to summary |
|---|---|
| public static final int STOPPING The bundle is about to deactivated.
The bundle's
| |
| type | back to summary |
|---|---|
| private final int type Type of bundle lifecycle change. | |
| UNINSTALLED | back to summary |
|---|---|
| public static final int UNINSTALLED The bundle has been uninstalled.
| |
| UNRESOLVED | back to summary |
|---|---|
| public static final int UNRESOLVED The bundle has been unresolved.
| |
| UPDATED | back to summary |
|---|---|
| public static final int UPDATED The bundle has been updated.
| |
| BundleEvent | back to summary |
|---|---|
| public BundleEvent(int type, Bundle bundle, Bundle origin) Creates a bundle event of the specified type. | |
| BundleEvent | back to summary |
|---|---|
| public BundleEvent(int type, Bundle bundle) Creates a bundle event of the specified type.
| |
| getBundle | back to summary |
|---|---|
| public Bundle getBundle() Returns the bundle which had a lifecycle change. This bundle is the source of the event.
| |
| getOrigin | back to summary |
|---|---|
| public Bundle getOrigin() Returns the bundle that was the origin of the event.
For the event type
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the type of lifecyle event. The type values are:
| |