public class FrameworkEvent extends java.util.EventObject
java.lang.Object
|
+--java.util.EventObject
|
+--org.osgi.framework.FrameworkEvent
All Implemented Interfaces: java.io.Serializable
General framework event. The event class used when notifying listeners of general framework events. A type code is used to identify the event for future extendability.
OSGi reserves the right to extend the set of types in the future.
Member Summary | |
---|---|
Fields | |
public static final | ERROR |
An error has occurred. | |
public static final | STARTED |
The framework has started. | |
Constructors | |
public | FrameworkEvent(int, Bundle, Throwable) |
Construct a framework event with a related bundle and exception. | |
public | FrameworkEvent(int, Object) |
Construct a framework event. | |
Methods | |
public Bundle | getBundle() |
Retrieve the bundle associated with the event. | |
public Throwable | getThrowable() |
Retrieve the exception associated with the event. | |
public int | getType() |
Retrieve the type of this event. |
public static final int ERROR
An error has occurred. There was an error associated with a bundle.
The value of ERROR is 0x00000002.
public static final int STARTED
The framework has started. This event is broadcast when the framework has started after all installed bundle that are marked to be started have been started.
The value of STARTED is 0x00000001.
public FrameworkEvent(int type, Bundle bundle,
java.lang.Throwable throwable)
Construct a framework event with a related bundle and exception. This constructor is used for framework events of type ERROR.
Parameters:
public FrameworkEvent(int type, java.lang.Object source)
Construct a framework event. This constructor is used for framework events of type STARTED.
Parameters:
public Bundle getBundle()
Retrieve the bundle associated with the event. If the event type is ERROR, this returns the bundle related to the error. This bundle is also the source of the event.
public java.lang.Throwable getThrowable()
Retrieve the exception associated with the event. If the event type is ERROR, this returns the exception related to the error.
public int getType()
Retrieve the type of this event. The type values are STARTED, ERROR.
3.146.176.145