Class ConfigurationObserver
- java.lang.Object
-
- com.sun.identity.common.configuration.ConfigurationObserver
-
- All Implemented Interfaces:
ServiceListener
public class ConfigurationObserver extends Object implements ServiceListener
This class listens to changes in configuration changes
-
-
Field Summary
-
Fields inherited from interface com.sun.identity.sm.ServiceListener
ADDED, MODIFIED, REMOVED
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddListener(ConfigurationListener l)Adds listener for all services.voidaddServiceListener(ConfigurationListener l, com.google.common.base.Predicate<String> servicePredicate)Adds listeners for service names that match the provided predicate.static ConfigurationObservergetInstance()Returns an instance ofConfigurationObserver.voidglobalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int type)This method will be invoked when a service's global configuration data has been changed.voidorganizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int type)This method will be invoked when a service's organization configuration data has been changed.voidschemaChanged(String serviceName, String version)This method will be invoked when a service's schema has been changed.
-
-
-
Method Detail
-
getInstance
public static ConfigurationObserver getInstance()
Returns an instance ofConfigurationObserver.- Returns:
- an instance of
ConfigurationObserver.
-
schemaChanged
public void schemaChanged(String serviceName, String version)
This method will be invoked when a service's schema has been changed.- Specified by:
schemaChangedin interfaceServiceListener- Parameters:
serviceName- Name of the service.version- Version of the service.
-
globalConfigChanged
public void globalConfigChanged(String serviceName, String version, String groupName, String serviceComponent, int type)
This method will be invoked when a service's global configuration data has been changed. The parametergroupNamedenote the name of the configuration grouping (e.g. default) andserviceComponentdenotes the service's sub-component that changed (e.g./NamedPolicy,/Templates).- Specified by:
globalConfigChangedin interfaceServiceListener- Parameters:
serviceName- Name of the service.version- Version of the service.groupName- Name of the configuration grouping.serviceComponent- Name of the service components that changed.type- change type, i.e., ADDED, REMOVED or MODIFIED.
-
addListener
public void addListener(ConfigurationListener l)
Adds listener for all services.- Parameters:
l- Listener to be added.
-
addServiceListener
public void addServiceListener(ConfigurationListener l, com.google.common.base.Predicate<String> servicePredicate)
Adds listeners for service names that match the provided predicate.- Parameters:
l- Listener to be added.servicePredicate- The predicate.
-
organizationConfigChanged
public void organizationConfigChanged(String serviceName, String version, String orgName, String groupName, String serviceComponent, int type)
Description copied from interface:ServiceListenerThis method will be invoked when a service's organization configuration data has been changed. The parametersorgName,groupNameandserviceComponentdenotes the organization name, configuration grouping name and service's sub-component that are changed respectively.- Specified by:
organizationConfigChangedin interfaceServiceListener- Parameters:
serviceName- name of the serviceversion- version of the serviceorgName- organization name as DNgroupName- name of the configuration groupingserviceComponent- the name of the service components that changedtype- change type, i.e., ADDED, REMOVED or MODIFIED
-
-