类 BundleEvent

  • 所有已实现的接口:
    java.io.Serializable

    public class BundleEvent
    extends java.util.EventObject
    An event from the Framework describing a bundle lifecycle change.

    BundleEvent objects are delivered to SynchronousBundleListeners and BundleListeners 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 int INSTALLED
      The bundle has been installed.
      static int LAZY_ACTIVATION
      The bundle will be lazily activated.
      static int RESOLVED
      The bundle has been resolved.
      static int STARTED
      The bundle has been started.
      static int STARTING
      The bundle is about to be activated.
      static int STOPPED
      The bundle has been stopped.
      static int STOPPING
      The bundle is about to deactivated.
      static int UNINSTALLED
      The bundle has been uninstalled.
      static int UNRESOLVED
      The bundle has been unresolved.
      static int UPDATED
      The bundle has been updated.
      • 从类继承的字段 java.util.EventObject

        source
    • 构造器概要

      构造器 
      构造器 说明
      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.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      Bundle getBundle()
      Returns the bundle which had a lifecycle change.
      Bundle getOrigin()
      Returns the bundle that was the origin of the event.
      int getType()
      Returns the type of lifecyle event.
      • 从类继承的方法 java.util.EventObject

        getSource, toString
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 构造器详细资料

      • 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 type INSTALLED, 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.
      • getOrigin

        public Bundle getOrigin()
        Returns the bundle that was the origin of the event.

        For the event type INSTALLED, this is the bundle whose context was used to install the bundle. Otherwise it is the bundle itself.

        返回:
        The bundle that was the origin of the event.
        从以下版本开始:
        1.6