public class BundleEvent
extends java.util.EventObject
BundleEvent objects are delivered to BundleListener objects when a change occurs in a bundle's lifecycle. A type code is used to identify the event type for future extendability.
OSGi reserves the right to extend the set of types.
| Modifier and Type | Field and Description |
|---|---|
static int |
INSTALLED
This bundle has been installed.
|
static int |
STARTED
This bundle has been started.
|
static int |
STOPPED
This bundle has been stopped.
|
static int |
UNINSTALLED
This bundle has been uninstalled.
|
static int |
UPDATED
This bundle has been updated.
|
| Constructor and Description |
|---|
BundleEvent(int type,
Bundle bundle)
Creates a bundle event of the specified type.
|
public static final int INSTALLED
The value of INSTALLED is 0x00000001.
public static final int STARTED
The value of STARTED is 0x00000002.
Bundle.start(),
Constant Field Valuespublic static final int STOPPED
The value of STOPPED is 0x00000004.
Bundle.stop(),
Constant Field Valuespublic static final int UPDATED
The value of UPDATED is 0x00000008.
Bundle.update(),
Constant Field Valuespublic static final int UNINSTALLED
The value of UNINSTALLED is 0x00000010.
Bundle.uninstall(),
Constant Field Valuespublic BundleEvent(int type,
Bundle bundle)
type - The event type.bundle - The bundle which had a lifecycle change.public Bundle getBundle()
public int getType()