Class ConfigurationEvent
ConfigurationEvent
objects are delivered to all registered
ConfigurationListener
service objects. ConfigurationEvents
must be asynchronously delivered in chronological order with respect to each
listener.
A type code is used to identify the type of event. The following event types are defined:
Additional event types may be defined in the future.
Security Considerations. ConfigurationEvent
objects do not
provide Configuration
objects, so no sensitive configuration
information is available from the event. If the listener wants to locate the
Configuration
object for the specified pid, it must use
ConfigurationAdmin
.
- Since:
- 1.2
- Version:
- $Revision: 6180 $
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
AConfiguration
has been deleted.static final int
The location of aConfiguration
has been changed.static final int
AConfiguration
has been updated. -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationEvent
(org.osgi.framework.ServiceReference reference, int type, String factoryPid, String pid) Constructs aConfigurationEvent
object from the givenServiceReference
object, event type, and pids. -
Method Summary
Modifier and TypeMethodDescriptionReturns the factory pid of the associated configuration.getPid()
Returns the pid of the associated configuration.org.osgi.framework.ServiceReference
Return theServiceReference
object of the Configuration Admin service that created this event.int
getType()
Return the type of this event.
-
Field Details
-
CM_UPDATED
public static final int CM_UPDATEDAConfiguration
has been updated.This
ConfigurationEvent
type that indicates that aConfiguration
object has been updated with new properties. An event is fired when a call toConfiguration.update(Dictionary)
successfully changes a configuration.The value of
CM_UPDATED
is 1.- See Also:
-
CM_DELETED
public static final int CM_DELETEDAConfiguration
has been deleted.This
ConfigurationEvent
type that indicates that aConfiguration
object has been deleted. An event is fired when a call toConfiguration.delete()
successfully deletes a configuration.The value of
CM_DELETED
is 2.- See Also:
-
CM_LOCATION_CHANGED
public static final int CM_LOCATION_CHANGEDThe location of aConfiguration
has been changed.This
ConfigurationEvent
type that indicates that the location of aConfiguration
object has been changed. An event is fired when a call toConfiguration.setBundleLocation(String)
successfully changes the location.- Since:
- 1.4
- See Also:
-
-
Constructor Details
-
ConfigurationEvent
public ConfigurationEvent(org.osgi.framework.ServiceReference reference, int type, String factoryPid, String pid) Constructs aConfigurationEvent
object from the givenServiceReference
object, event type, and pids.- Parameters:
reference
- TheServiceReference
object of the Configuration Admin service that created this event.type
- The event type. SeegetType()
.factoryPid
- The factory pid of the associated configuration if the target of the configuration is a ManagedServiceFactory. Otherwisenull
if the target of the configuration is a ManagedService.pid
- The pid of the associated configuration.
-
-
Method Details
-
getFactoryPid
Returns the factory pid of the associated configuration.- Returns:
- Returns the factory pid of the associated configuration if the
target of the configuration is a ManagedServiceFactory. Otherwise
null
if the target of the configuration is a ManagedService.
-
getPid
Returns the pid of the associated configuration.- Returns:
- Returns the pid of the associated configuration.
-
getType
public int getType()Return the type of this event.The type values are:
- Returns:
- The type of this event.
-
getReference
public org.osgi.framework.ServiceReference getReference()Return theServiceReference
object of the Configuration Admin service that created this event.- Returns:
- The
ServiceReference
object for the Configuration Admin service that created this event.
-