类 BundleEvent
- java.lang.Object
-
- java.util.EventObject
-
- org.osgi.framework.BundleEvent
-
- 所有已实现的接口:
java.io.Serializable
public class BundleEvent extends java.util.EventObjectAn event from the Framework describing a bundle lifecycle change.BundleEventobjects are delivered toSynchronousBundleListeners andBundleListeners when a change occurs in a bundle's lifecycle. A type code is used to identify the event type for future extendability.OSGi Alliance reserves the right to extend the set of types.
- 作者:
- $Id: cd49848213816c4f76541b70be12ac3af7900972 $
- 另请参阅:
BundleListener,SynchronousBundleListener, 序列化表格
-
-
字段概要
字段 修饰符和类型 字段 说明 static intINSTALLEDThe bundle has been installed.static intLAZY_ACTIVATIONThe bundle will be lazily activated.static intRESOLVEDThe bundle has been resolved.static intSTARTEDThe bundle has been started.static intSTARTINGThe bundle is about to be activated.static intSTOPPEDThe bundle has been stopped.static intSTOPPINGThe bundle is about to deactivated.static intUNINSTALLEDThe bundle has been uninstalled.static intUNRESOLVEDThe bundle has been unresolved.static intUPDATEDThe bundle has been updated.
-
构造器概要
构造器 构造器 说明 BundleEvent(int type, Bundle bundle)Creates a bundle event of the specified type.BundleEvent(int type, Bundle bundle, Bundle origin)Creates a bundle event of the specified type.
-
-
-
字段详细资料
-
INSTALLED
public static final int INSTALLED
The bundle has been installed.
-
STARTED
public static final int STARTED
The bundle has been started.The bundle's
BundleActivator startmethod has been executed if the bundle has a bundle activator class.- 另请参阅:
Bundle.start(), 常量字段值
-
STOPPED
public static final int STOPPED
The bundle has been stopped.The bundle's
BundleActivator stopmethod has been executed if the bundle has a bundle activator class.- 另请参阅:
Bundle.stop(), 常量字段值
-
UPDATED
public static final int UPDATED
The bundle has been updated.- 另请参阅:
Bundle.update(), 常量字段值
-
UNINSTALLED
public static final int UNINSTALLED
The bundle has been uninstalled.- 另请参阅:
Bundle.uninstall(), 常量字段值
-
RESOLVED
public static final int RESOLVED
The bundle has been resolved.- 从以下版本开始:
- 1.3
- 另请参阅:
Bundle.RESOLVED, 常量字段值
-
UNRESOLVED
public static final int UNRESOLVED
The bundle has been unresolved.- 从以下版本开始:
- 1.3
- 另请参阅:
Bundle.INSTALLED, 常量字段值
-
STARTING
public static final int STARTING
The bundle is about to be activated.The bundle's
BundleActivator startmethod is about to be called if the bundle has a bundle activator class. This event is only delivered toSynchronousBundleListeners. It is not delivered toBundleListeners.- 从以下版本开始:
- 1.3
- 另请参阅:
Bundle.start(), 常量字段值
-
STOPPING
public static final int STOPPING
The bundle is about to deactivated.The bundle's
BundleActivator stopmethod is about to be called if the bundle has a bundle activator class. This event is only delivered toSynchronousBundleListeners. It is not delivered toBundleListeners.- 从以下版本开始:
- 1.3
- 另请参阅:
Bundle.stop(), 常量字段值
-
LAZY_ACTIVATION
public static final int LAZY_ACTIVATION
The bundle will be lazily activated.The bundle has a
lazy activation policyand is waiting to be activated. It is now in theSTARTINGstate and has a validBundleContext. This event is only delivered toSynchronousBundleListeners. It is not delivered toBundleListeners.- 从以下版本开始:
- 1.4
- 另请参阅:
- 常量字段值
-
-
构造器详细资料
-
BundleEvent
public BundleEvent(int type, Bundle bundle, Bundle origin)Creates a bundle event of the specified type.- 参数:
type- The event type.bundle- The bundle which had a lifecycle change.origin- The bundle which is the origin of the event. For the event typeINSTALLED, this is the bundle whose context was used to install the bundle. Otherwise it is the bundle itself.- 从以下版本开始:
- 1.6
-
BundleEvent
public BundleEvent(int type, Bundle bundle)Creates a bundle event of the specified type.- 参数:
type- The event type.bundle- The bundle which had a lifecycle change. This bundle is used as the origin of the event.
-
-
方法详细资料
-
getBundle
public Bundle getBundle()
Returns the bundle which had a lifecycle change. This bundle is the source of the event.- 返回:
- The bundle that had a change occur in its lifecycle.
-
getType
public int getType()
Returns the type of lifecyle event. The type values are:- 返回:
- The type of lifecycle event.
-
-