FrameworkEvent

Syntax

public class FrameworkEvent extends java.util.EventObject

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

All Implemented Interfaces: java.io.Serializable

Description

General framework event. The event class used when notifying listeners of general framework events. 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 finalERROR
 An error has occurred.
public static finalSTARTED
 The framework has started.
Constructors
publicFrameworkEvent(int, Bundle, Throwable)
 Construct a framework event with a related bundle and exception.
publicFrameworkEvent(int, Object)
 Construct a framework event.
Methods
public BundlegetBundle()
 Retrieve the bundle associated with the event.
public ThrowablegetThrowable()
 Retrieve the exception associated with the event.
public intgetType()
 Retrieve the type of this event.

Fields

ERROR
public static final int ERROR
						

An error has occurred. There was an error associated with a bundle.

The value of ERROR is 0x00000002.

STARTED
public static final int STARTED
						

The framework has started. This event is broadcast when the framework has started after all installed bundle that are marked to be started have been started.

The value of STARTED is 0x00000001.

Constructors

FrameworkEvent(int, Bundle, Throwable)
public FrameworkEvent(int type, Bundle bundle,
           java.lang.Throwable throwable)

Construct a framework event with a related bundle and exception. This constructor is used for framework events of type ERROR.

Parameters:

type— The event type.

bundle— The related bundle.

throwable— The related exception.

FrameworkEvent(int, Object)
public FrameworkEvent(int type, java.lang.Object source)

Construct a framework event. This constructor is used for framework events of type STARTED.

Parameters:

type— The event type.

source— The event source object. (This may not be null.)

Methods

getBundle()
public Bundle getBundle()

Retrieve the bundle associated with the event. If the event type is ERROR, this returns the bundle related to the error. This bundle is also the source of the event.

Returns: A bundle if an ERROR event type or null.

getThrowable()
public java.lang.Throwable getThrowable()

Retrieve the exception associated with the event. If the event type is ERROR, this returns the exception related to the error.

Returns: An exception if an ERROR event type or null.

getType()
public int getType()

Retrieve the type of this event. The type values are STARTED, ERROR.

Returns: The type of bundle state change.

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

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