public class FrameworkEvent extends EventObject
FrameworkEvent
objects are delivered to
FrameworkListener
s 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
,
Serialized FormModifier and Type | Field and Description |
---|---|
static int |
ERROR
An error has occurred.
|
static int |
INFO
An informational event has occurred.
|
static int |
PACKAGES_REFRESHED
A PackageAdmin.refreshPackage operation has completed.
|
static int |
STARTED
The Framework has started.
|
static int |
STARTLEVEL_CHANGED
A StartLevel.setStartLevel operation has completed.
|
static int |
STOPPED
The Framework has stopped.
|
static int |
STOPPED_BOOTCLASSPATH_MODIFIED
The Framework has stopped and the boot class path has changed.
|
static int |
STOPPED_UPDATE
The Framework has stopped during update.
|
static int |
WAIT_TIMEDOUT
The Framework did not stop before the wait timeout expired.
|
static int |
WARNING
A warning has occurred.
|
source
Constructor and Description |
---|
FrameworkEvent(int type,
Bundle bundle,
Throwable throwable)
Creates a Framework event regarding the specified bundle.
|
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.
|
Modifier and Type | Method and Description |
---|---|
Bundle |
getBundle()
Returns the bundle associated with the event.
|
Throwable |
getThrowable()
Returns the exception related to this event.
|
int |
getType()
Returns the type of framework event.
|
getSource, toString
public static final int 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.
public static final int ERROR
There was an error associated with a bundle.
public static final int PACKAGES_REFRESHED
This event is fired when the Framework has completed the refresh packages operation initiated by a call to the PackageAdmin.refreshPackages method. The source of this event is the System Bundle.
PackageAdmin.refreshPackages
",
Constant Field Valuespublic static final int STARTLEVEL_CHANGED
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.
public static final int WARNING
There was a warning associated with a bundle.
public static final int INFO
There was an informational event associated with a bundle.
public static final int 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.
public static final int STOPPED_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.
public static final int STOPPED_BOOTCLASSPATH_MODIFIED
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.
public static final int WAIT_TIMEDOUT
This event is fired when the Framework did not stop before the wait timeout expired. The source of this event is the System Bundle.
public FrameworkEvent(int type, Object source)
type
- The event type.source
- The event source object. This may not be null
.public Throwable getThrowable()
null
if none.public Bundle getBundle()
public int getType()
The type values are:
Copyright © 2018 JBoss by Red Hat. All rights reserved.