ServiceEvent
objects are delivered to a ServiceListener
objects when a change occurs in this service'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.
Definition at line 38 of file ServiceEvent.java.
Public Member Functions | |
ServiceEvent (int type, ServiceReference reference) | |
Creates a new service event object. | |
ServiceReference | getServiceReference () |
Returns a reference to the service that had a change occur in its lifecycle. | |
int | getType () |
Returns the type of event. | |
Static Public Attributes | |
static final int | REGISTERED = 0x00000001 |
This service has been registered. | |
static final int | MODIFIED = 0x00000002 |
The properties of a registered service have been modified. | |
static final int | UNREGISTERING = 0x00000004 |
This service is in the process of being unregistered. |
org.osgi.framework.ServiceEvent.ServiceEvent | ( | int | type, | |
ServiceReference | reference | |||
) |
Creates a new service event object.
type | The event type. | |
reference | A ServiceReference object to the service that had a lifecycle change. |
Definition at line 104 of file ServiceEvent.java.
ServiceReference org.osgi.framework.ServiceEvent.getServiceReference | ( | ) |
Returns a reference to the service that had a change occur in its lifecycle.
This reference is the source of the event.
Definition at line 118 of file ServiceEvent.java.
Referenced by org.knopflerfish.framework.Listeners.serviceChanged(), and org.openmobileis.bundle.osgi.synchro.BaseBundleLoaderActivator.start().
int org.osgi.framework.ServiceEvent.getType | ( | ) |
Returns the type of event.
The event type values are:
Definition at line 133 of file ServiceEvent.java.
Referenced by org.osgi.util.tracker.ServiceTracker.Tracked.serviceChanged(), and org.openmobileis.bundle.osgi.synchro.BaseBundleLoaderActivator.start().
final int org.osgi.framework.ServiceEvent.REGISTERED = 0x00000001 [static] |
This service has been registered.
This event is synchronously delivered after the service has been registered with the Framework.
The value of REGISTERED
is 0x00000001.
Definition at line 61 of file ServiceEvent.java.
final int org.osgi.framework.ServiceEvent.MODIFIED = 0x00000002 [static] |
The properties of a registered service have been modified.
This event is synchronously delivered after the service properties have been modified.
The value of MODIFIED
is 0x00000002.
Definition at line 74 of file ServiceEvent.java.
final int org.osgi.framework.ServiceEvent.UNREGISTERING = 0x00000004 [static] |
This service is in the process of being unregistered.
This event is synchronously delivered before the service has completed unregistering.
If a bundle is using a service that is UNREGISTERING
, the bundle should release its use of the service when it receives this event. If the bundle does not release its use of the service when it receives this event, the Framework will automatically release the bundle's use of the service while completing the service unregistration operation.
The value of UNREGISTERING is 0x00000004.
Definition at line 95 of file ServiceEvent.java.