Class FrameworkEvent
- All Implemented Interfaces:
Serializable
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.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
An error has occurred.static final int
An informational event has occurred.static final int
A FrameworkWiring.refreshBundles operation has completed.static final int
The Framework has started.static final int
A FrameworkStartLevel.setStartLevel operation has completed.static final int
The Framework has stopped.static final int
Deprecated.As of 1.10.static final int
The Framework has stopped and the framework requires a new class loader to restart.static final int
The Framework has stopped during update.static final int
The Framework did not stop before the wait timeout expired.static final int
A warning has occurred.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionFrameworkEvent
(int type, Object source) Deprecated.As of 1.2.FrameworkEvent
(int type, Bundle bundle, Throwable throwable) Creates a Framework event regarding the specified bundle. -
Method Summary
Modifier and TypeMethodDescriptionReturns the bundle associated with the event.Returns the exception related to this event.int
getType()
Returns the type of framework event.Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
STARTED
public static final int STARTEDThe 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.
- See Also:
-
- "The Start Level Specification"
- Constant Field Values
-
ERROR
public static final int ERRORAn error has occurred.There was an error associated with a bundle.
- See Also:
-
PACKAGES_REFRESHED
public static final int PACKAGES_REFRESHEDA 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.
-
STARTLEVEL_CHANGED
public static final int STARTLEVEL_CHANGEDA 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.
- Since:
- 1.2
- See Also:
-
WARNING
public static final int WARNINGA warning has occurred.There was a warning associated with a bundle.
- Since:
- 1.3
- See Also:
-
INFO
public static final int INFOAn informational event has occurred.There was an informational event associated with a bundle.
- Since:
- 1.3
- See Also:
-
STOPPED
public static final int STOPPEDThe 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.
- Since:
- 1.5
- See Also:
-
STOPPED_UPDATE
public static final int STOPPED_UPDATEThe 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.
- Since:
- 1.5
- See Also:
-
STOPPED_BOOTCLASSPATH_MODIFIED
public static final int STOPPED_BOOTCLASSPATH_MODIFIEDDeprecated.As of 1.10.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.
- Since:
- 1.5
- See Also:
-
WAIT_TIMEDOUT
public static final int WAIT_TIMEDOUTThe 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.
- Since:
- 1.5
- See Also:
-
STOPPED_SYSTEM_REFRESHED
public static final int STOPPED_SYSTEM_REFRESHEDThe Framework has stopped and the framework requires a new class loader to restart.This event is fired when the Framework has been stopped because of a refresh operation on the system bundle and the framework requires a new class loader to be used to restart. For example, if a framework extension bundle has been refreshed. The source of this event is the System Bundle.
- Since:
- 1.9
- See Also:
-
-
Constructor Details
-
FrameworkEvent
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.- Parameters:
type
- The event type.source
- The event source object. This may not benull
.
-
FrameworkEvent
Creates a Framework event regarding the specified bundle.- Parameters:
type
- The event type.bundle
- The event source.throwable
- The related exception. This argument may benull
if there is no related exception.
-
-
Method Details
-
getThrowable
Returns the exception related to this event.- Returns:
- The related exception or
null
if none.
-
getBundle
Returns the bundle associated with the event. This bundle is also the source of the event.- Returns:
- The bundle associated with the event.
-
getType
public int getType()Returns the type of framework event.The type values are:
- Returns:
- The type of state change.
-