FrameworkEvent objects are delivered to FrameworkListeners
when a general event occurs within the OSGi environment. A type code is used
to identify the event type for future extendability.
OSGi Alliance reserves the right to extend the set of event types.
FrameworkListener
| Modifier and Type | Field and Description |
|---|---|
| private final Bundle | bundle
Bundle related to the event. |
| public static final int | ERROR
An error has occurred. |
| public static final int | INFO
An informational event has occurred. |
| public static final int | PACKAGES_REFRESHED
A FrameworkWiring.refreshBundles operation has completed. |
| pack-priv static final long | |
| public static final int | STARTED
The Framework has started. |
| public static final int | STARTLEVEL_CHANGED
A FrameworkStartLevel.setStartLevel operation has completed. |
| public static final int | STOPPED
The Framework has stopped. |
| public static final int | STOPPED_BOOTCLASSPATH_MODIFIED
The Framework has stopped and the boot class path has changed. |
| public static final int | STOPPED_UPDATE
The Framework has stopped during update. |
| private final Throwable | throwable
Exception related to the event. |
| private final int | type
Type of event. |
| public static final int | WAIT_TIMEDOUT
The Framework did not stop before the wait timeout expired. |
| public static final int | WARNING
A warning has occurred. |
| Access | Constructor and Description |
|---|---|
| public | FrameworkEvent(int
The event type. type, Object The event source object. This may not be source)null.
Deprecated
As of 1.2. This constructor is deprecated in favor of using
the other constructor with the System Bundle as the event
source.
Creates a Framework event. |
| public | FrameworkEvent(int
The event type. type, Bundle The event source. bundle, Throwable The related exception. This argument may be throwable)null
if there is no related exception.Creates a Framework event regarding the specified bundle. |
| Modifier and Type | Method and Description |
|---|---|
| public Bundle | Returns: The bundle associated with the event.Returns the bundle associated with the event. |
| public Throwable | Returns: The related exception ornull if none.Returns the exception related to this event. |
| public int |
| bundle | back to summary |
|---|---|
| private final Bundle bundle Bundle related to the event. | |
| ERROR | back to summary |
|---|---|
| public static final int ERROR An error has occurred. There was an error associated with a bundle. | |
| INFO | back to summary |
|---|---|
| public static final int INFO An informational event has occurred. There was an informational event associated with a bundle.
| |
| PACKAGES_REFRESHED | back to summary |
|---|---|
| public static final int PACKAGES_REFRESHED A FrameworkWiring.refreshBundles operation has completed. This event is fired when the Framework has completed the refresh bundles operation initiated by a call to the FrameworkWiring.refreshBundles method. The source of this event is the System Bundle.
| |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| STARTED | back to summary |
|---|---|
| public static final int STARTED The Framework has started. This event is fired when the Framework has started after all installed bundles that are marked to be started have been started and the Framework has reached the initial start level. The source of this event is the System Bundle.
| |
| STARTLEVEL_CHANGED | back to summary |
|---|---|
| public static final int STARTLEVEL_CHANGED A FrameworkStartLevel.setStartLevel operation has completed. This event is fired when the Framework has completed changing the active start level initiated by a call to the StartLevel.setStartLevel method. The source of this event is the System Bundle.
| |
| STOPPED | back to summary |
|---|---|
| public static final int STOPPED The Framework has stopped. This event is fired when the Framework has been stopped because of a stop operation on the system bundle. The source of this event is the System Bundle.
| |
| STOPPED_BOOTCLASSPATH_MODIFIED | back to summary |
|---|---|
| public static final int STOPPED_BOOTCLASSPATH_MODIFIED The Framework has stopped and the boot class path has changed. This event is fired when the Framework has been stopped because of a stop operation on the system bundle and a bootclasspath extension bundle has been installed or updated. The source of this event is the System Bundle.
| |
| STOPPED_UPDATE | back to summary |
|---|---|
| public static final int STOPPED_UPDATE The Framework has stopped during update. This event is fired when the Framework has been stopped because of an update operation on the system bundle. The Framework will be restarted after this event is fired. The source of this event is the System Bundle.
| |
| throwable | back to summary |
|---|---|
| private final Throwable throwable Exception related to the event. | |
| type | back to summary |
|---|---|
| private final int type Type of event. | |
| WAIT_TIMEDOUT | back to summary |
|---|---|
| public static final int WAIT_TIMEDOUT The Framework did not stop before the wait timeout expired. This event is fired when the Framework did not stop before the wait timeout expired. The source of this event is the System Bundle.
| |
| WARNING | back to summary |
|---|---|
| public static final int WARNING A warning has occurred. There was a warning associated with a bundle.
| |
| FrameworkEvent | back to summary |
|---|---|
| public FrameworkEvent(int type, Object source)
Deprecated As of 1.2. This constructor is deprecated in favor of using the other constructor with the System Bundle as the event source. Creates a Framework event.
| |
| FrameworkEvent | back to summary |
|---|---|
| public FrameworkEvent(int type, Bundle bundle, Throwable throwable) Creates a Framework event regarding the specified bundle. | |
| getBundle | back to summary |
|---|---|
| public Bundle getBundle() Returns the bundle associated with the event. This bundle is also the source of the event.
| |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Returns the exception related to this event.
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the type of framework event. The type values are:
| |