类 FrameworkEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.osgi.framework.FrameworkEvent
-
- 所有已实现的接口:
java.io.Serializable
public class FrameworkEvent extends java.util.EventObjectA general event from the Framework.FrameworkEventobjects are delivered toFrameworkListeners 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.
- 作者:
- $Id: 7b74a68311acf2116ccf21e589ece0ce2cd383ba $
- 另请参阅:
FrameworkListener, 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static intERRORAn error has occurred.static intINFOAn informational event has occurred.static intPACKAGES_REFRESHEDA FrameworkWiring.refreshBundles operation has completed.static intSTARTEDThe Framework has started.static intSTARTLEVEL_CHANGEDA FrameworkStartLevel.setStartLevel operation has completed.static intSTOPPEDThe Framework has stopped.static intSTOPPED_BOOTCLASSPATH_MODIFIEDThe Framework has stopped and the boot class path has changed.static intSTOPPED_UPDATEThe Framework has stopped during update.static intWAIT_TIMEDOUTThe Framework did not stop before the wait timeout expired.static intWARNINGA warning has occurred.
-
构造器概要
构造器 构造器 说明 FrameworkEvent(int type, java.lang.Object source)已过时。As of 1.2.FrameworkEvent(int type, Bundle bundle, java.lang.Throwable throwable)Creates a Framework event regarding the specified bundle.
-
-
-
字段详细资料
-
STARTED
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.
- 另请参阅:
- "The Start Level Specification", 常量字段值
-
ERROR
public static final int ERROR
An error has occurred.There was an error associated with a bundle.
- 另请参阅:
- 常量字段值
-
PACKAGES_REFRESHED
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.
- 从以下版本开始:
- 1.2
- 另请参阅:
FrameworkWiring.refreshBundles(java.util.Collection, FrameworkListener...), 常量字段值
-
STARTLEVEL_CHANGED
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.
- 从以下版本开始:
- 1.2
- 另请参阅:
FrameworkStartLevel.setStartLevel(int, FrameworkListener...), 常量字段值
-
WARNING
public static final int WARNING
A warning has occurred.There was a warning associated with a bundle.
- 从以下版本开始:
- 1.3
- 另请参阅:
- 常量字段值
-
INFO
public static final int INFO
An informational event has occurred.There was an informational event associated with a bundle.
- 从以下版本开始:
- 1.3
- 另请参阅:
- 常量字段值
-
STOPPED
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.
- 从以下版本开始:
- 1.5
- 另请参阅:
- 常量字段值
-
STOPPED_UPDATE
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.
- 从以下版本开始:
- 1.5
- 另请参阅:
- 常量字段值
-
STOPPED_BOOTCLASSPATH_MODIFIED
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.
- 从以下版本开始:
- 1.5
- 另请参阅:
- 常量字段值
-
WAIT_TIMEDOUT
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.
- 从以下版本开始:
- 1.5
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
FrameworkEvent
public FrameworkEvent(int type, java.lang.Object source)已过时。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.- 参数:
type- The event type.source- The event source object. This may not benull.
-
FrameworkEvent
public FrameworkEvent(int type, Bundle bundle, java.lang.Throwable throwable)Creates a Framework event regarding the specified bundle.- 参数:
type- The event type.bundle- The event source.throwable- The related exception. This argument may benullif there is no related exception.
-
-
方法详细资料
-
getThrowable
public java.lang.Throwable getThrowable()
Returns the exception related to this event.- 返回:
- The related exception or
nullif none.
-
getBundle
public Bundle getBundle()
Returns the bundle associated with the event. This bundle is also the source of the event.- 返回:
- The bundle associated with the event.
-
getType
public int getType()
Returns the type of framework event.The type values are:
- 返回:
- The type of state change.
-
-