org.osgi.framework
public class ServiceEvent extends EventObject
ServiceEvent
objects are delivered to
ServiceListener
s and AllServiceListener
s 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.
Version: $Revision: 1.15 $
See Also: ServiceListener AllServiceListener
UNKNOWN:
Field Summary | |
---|---|
static int | MODIFIED
The properties of a registered service have been modified.
|
static int | REGISTERED
This service has been registered.
|
static int | UNREGISTERING
This service is in the process of being unregistered.
|
Constructor Summary | |
---|---|
ServiceEvent(int type, ServiceReference reference)
Creates a new service event object.
|
Method Summary | |
---|---|
ServiceReference | getServiceReference()
Returns a reference to the service that had a change occur in its
lifecycle.
|
int | getType()
Returns the type of event. |
This event is synchronously delivered after the service properties have been modified.
The value of MODIFIED
is 0x00000002.
See Also: ServiceRegistration
This event is synchronously delivered after the service has been registered with the Framework.
The value of REGISTERED
is 0x00000001.
See Also: (String[],Object,java.util.Dictionary)
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.
See Also: ServiceRegistration BundleContext
Parameters: type The event type. reference A ServiceReference
object to the service
that had a lifecycle change.
This reference is the source of the event.
Returns: Reference to the service that had a lifecycle change.
Returns: Type of service lifecycle change.