Class BundleEvent
- All Implemented Interfaces:
Serializable
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.
- Version:
- $Revision: 6542 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe bundle has been installed.static final intThe bundle will be lazily activated.static final intThe bundle has been resolved.static final intThe bundle has been started.static final intThe bundle is about to be activated.static final intThe bundle has been stopped.static final intThe bundle is about to deactivated.static final intThe bundle has been uninstalled.static final intThe bundle has been unresolved.static final intThe bundle has been updated.Fields inherited from class EventObject
source -
Constructor Summary
ConstructorsConstructorDescriptionBundleEvent(int type, Bundle bundle) Creates a bundle event of the specified type. -
Method Summary
Methods inherited from class EventObject
getSource, toString
-
Field Details
-
INSTALLED
public static final int INSTALLEDThe bundle has been installed.- See Also:
-
STARTED
public static final int STARTEDThe bundle has been started.The bundle's
BundleActivator startmethod has been executed if the bundle has a bundle activator class.- See Also:
-
STOPPED
public static final int STOPPEDThe bundle has been stopped.The bundle's
BundleActivator stopmethod has been executed if the bundle has a bundle activator class.- See Also:
-
UPDATED
public static final int UPDATEDThe bundle has been updated.- See Also:
-
UNINSTALLED
public static final int UNINSTALLEDThe bundle has been uninstalled.- See Also:
-
RESOLVED
public static final int RESOLVEDThe bundle has been resolved.- Since:
- 1.3
- See Also:
-
UNRESOLVED
public static final int UNRESOLVEDThe bundle has been unresolved.- Since:
- 1.3
- See Also:
-
STARTING
public static final int STARTINGThe 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.- Since:
- 1.3
- See Also:
-
STOPPING
public static final int STOPPINGThe 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.- Since:
- 1.3
- See Also:
-
LAZY_ACTIVATION
public static final int LAZY_ACTIVATIONThe 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.- Since:
- 1.4
- See Also:
-
-
Constructor Details
-
BundleEvent
Creates a bundle event of the specified type.- Parameters:
type- The event type.bundle- The bundle which had a lifecycle change.
-
-
Method Details
-
getBundle
Returns the bundle which had a lifecycle change. This bundle is the source of the event.- Returns:
- The bundle that had a change occur in its lifecycle.
-
getType
public int getType()Returns the type of lifecyle event. The type values are:- Returns:
- The type of lifecycle event.
-