Class ConfigurationEvent
- java.lang.Object
 - 
- org.osgi.service.cm.ConfigurationEvent
 
 
- 
public class ConfigurationEvent extends java.lang.ObjectA Configuration Event.ConfigurationEventobjects are delivered to all registeredConfigurationListenerservice objects. ConfigurationEvents must be 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.
ConfigurationEventobjects do not provideConfigurationobjects, so no sensitive configuration information is available from the event. If the listener wants to locate theConfigurationobject for the specified pid, it must useConfigurationAdmin.- Since:
 - 1.2
 - See Also:
 ConfigurationListener
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static intCM_DELETEDAConfigurationhas been deleted.static intCM_LOCATION_CHANGEDThe location of aConfigurationhas been changed.static intCM_UPDATEDAConfigurationhas been updated. 
- 
Constructor Summary
Constructors Constructor Description ConfigurationEvent(org.osgi.framework.ServiceReference<ConfigurationAdmin> reference, int type, java.lang.String factoryPid, java.lang.String pid)Constructs aConfigurationEventobject from the givenServiceReferenceobject, event type, and pids. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetFactoryPid()Returns the factory pid of the associated configuration.java.lang.StringgetPid()Returns the pid of the associated configuration.org.osgi.framework.ServiceReference<ConfigurationAdmin>getReference()Return theServiceReferenceobject of the Configuration Admin service that created this event.intgetType()Return the type of this event. 
 - 
 
- 
- 
Field Detail
- 
CM_UPDATED
public static final int CM_UPDATED
AConfigurationhas been updated.This
ConfigurationEventtype that indicates that aConfigurationobject has been updated with new properties. An event is fired when a call toConfiguration.update(Dictionary)successfully changes a configuration.- See Also:
 - Constant Field Values
 
 
- 
CM_DELETED
public static final int CM_DELETED
AConfigurationhas been deleted.This
ConfigurationEventtype that indicates that aConfigurationobject has been deleted. An event is fired when a call toConfiguration.delete()successfully deletes a configuration.- See Also:
 - Constant Field Values
 
 
- 
CM_LOCATION_CHANGED
public static final int CM_LOCATION_CHANGED
The location of aConfigurationhas been changed.This
ConfigurationEventtype that indicates that the location of aConfigurationobject has been changed. An event is fired when a call toConfiguration.setBundleLocation(String)successfully changes the location.- Since:
 - 1.4
 - See Also:
 - Constant Field Values
 
 
 - 
 
- 
Constructor Detail
- 
ConfigurationEvent
public ConfigurationEvent(org.osgi.framework.ServiceReference<ConfigurationAdmin> reference, int type, java.lang.String factoryPid, java.lang.String pid)
Constructs aConfigurationEventobject from the givenServiceReferenceobject, event type, and pids.- Parameters:
 reference- TheServiceReferenceobject 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. Otherwisenullif the target of the configuration is a ManagedService.pid- The pid of the associated configuration.
 
 - 
 
- 
Method Detail
- 
getFactoryPid
public java.lang.String 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
         
nullif the target of the configuration is a ManagedService. 
 
- 
getPid
public java.lang.String 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<ConfigurationAdmin> getReference()
Return theServiceReferenceobject of the Configuration Admin service that created this event.- Returns:
 - The 
ServiceReferenceobject for the Configuration Admin service that created this event. 
 
 - 
 
 -