BundleEvent

Syntax

public class BundleEvent extends java.util.EventObject

java.lang.Object
  |
  +--java.util.EventObject
        |
        +--org.osgi.framework.BundleEvent
					

All Implemented Interfaces:

java.io.Serializable

Description

Bundle life cycle change event. BundleEvents are delivered to BundleListener s when a change occurs in the bundle's life cycle. 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 finalINSTALLED
 A bundle has been installed.
public static finalSTARTED
 A bundle has been started.
public static finalSTOPPED
 A bundle has been stopped.
public static finalUNINSTALLED
 A bundle has been uninstalled.
public static finalUPDATED
 A bundle has been updated.
Constructors
publicBundleEvent(int, Bundle)
 Construct a bundle event.
Methods
public BundlegetBundle()
 Retrieve the bundle who had a change occur in its life cycle.
public intgetType()
 Retrieve the type of this event.

Fields

INSTALLED
public static final int INSTALLED
						

A bundle has been installed.

The value of INSTALLED is 0x00000001.

See Also: BundleContext.installBundle(String)

STARTED
public static final int STARTED
						

A bundle has been started.

The value of STARTED is 0x00000002.

See Also: Bundle.start()

STOPPED
public static final int STOPPED
						

A bundle has been stopped.

The value of STOPPED is 0x00000004.

See Also: Bundle.stop()

UNINSTALLED
public static final int UNINSTALLED
						

A bundle has been uninstalled.

The value of UNINSTALLED is 0x00000010.

See Also: Bundle.uninstall()

UPDATED
public static final int UPDATED
						

A bundle has been updated.

The value of UPDATED is 0x00000008.

See Also: Bundle.update()

Constructors

BundleEvent(int, Bundle)
public BundleEvent(int type, Bundle bundle)

Construct a bundle event.

Parameters:

type— The event type.

bundle— The bundle who had a change occur in its life cycle.

Methods

getBundle()
public Bundle getBundle()

Retrieve the bundle who had a change occur in its life cycle. This bundle is the source of the event.

Returns: The bundle who had a change occur in its life cycle.

getType()
public int getType()

Retrieve the type of this event. The type values are INSTALLED, STARTED, STOPPED, UPDATED, UNINSTALLED.

Returns: The type of bundle life cycle change.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.226.98.208