ServiceEvent objects are delivered to ServiceListeners and
AllServiceListeners 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.
ServiceListener, AllServiceListener
| Modifier and Type | Field and Description |
|---|---|
| public static final int | MODIFIED
The properties of a registered service have been modified. |
| public static final int | MODIFIED_ENDMATCH
The properties of a registered service have been modified and the new properties no longer match the listener's filter. |
| private final ServiceReference | reference
Reference to the service that had a change occur in its lifecycle. |
| public static final int | REGISTERED
This service has been registered. |
| pack-priv static final long | |
| private final int | type
Type of service lifecycle change. |
| public static final int | UNREGISTERING
This service is in the process of being unregistered. |
| Access | Constructor and Description |
|---|---|
| public | ServiceEvent(int
The event type. type, ServiceReference<?> A reference)ServiceReference object to the service that
had a lifecycle change.Creates a new service event object. |
| Modifier and Type | Method and Description |
|---|---|
| public ServiceReference | Returns: Reference to the service that had a lifecycle change.Returns a reference to the service that had a change occur in its lifecycle. |
| public int |
| MODIFIED | back to summary |
|---|---|
| public static final int MODIFIED The properties of a registered service have been modified. This event is synchronously delivered after the service properties have been modified. | |
| MODIFIED_ENDMATCH | back to summary |
|---|---|
| public static final int MODIFIED_ENDMATCH The properties of a registered service have been modified and the new properties no longer match the listener's filter.
This event is synchronously delivered after the service
properties have been modified. This event is only delivered to listeners
which were added with a non-
| |
| reference | back to summary |
|---|---|
| private final ServiceReference<?> reference Reference to the service that had a change occur in its lifecycle. | |
| REGISTERED | back to summary |
|---|---|
| public static final int REGISTERED This service has been registered. This event is synchronously delivered after the service has been registered with the Framework. | |
| serialVersionUID | back to summary |
|---|---|
| pack-priv static final long serialVersionUID | |
| type | back to summary |
|---|---|
| private final int type Type of service lifecycle change. | |
| UNREGISTERING | back to summary |
|---|---|
| public static final int UNREGISTERING 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 | |
| ServiceEvent | back to summary |
|---|---|
| public ServiceEvent(int type, ServiceReference<?> reference) Creates a new service event object.
| |
| getServiceReference | back to summary |
|---|---|
| public ServiceReference Returns a reference to the service that had a change occur in its lifecycle. This reference is the source of the event.
| |
| getType | back to summary |
|---|---|
| public int getType() Returns the type of event. The event type values are:
| |