org.sakaiproject.component.api
Interface ServerConfigurationService.ConfigurationListener

Enclosing interface:
ServerConfigurationService

public static interface ServerConfigurationService.ConfigurationListener

Allows a service to be notified when configuration settings are changed, It is up to the implementor to ignore the changes they do not care about. Filter on the ServerConfigurationService.ConfigurationListener.BlockingConfigItem.getName(). NOTE: this does NOT include any changes which happen during the initial properties file loading


Nested Class Summary
static class ServerConfigurationService.ConfigurationListener.BlockingConfigItem
          This is a special marker class that is used in the ServerConfigurationService.ConfigurationListener, returning this indicates that the config change should stop processing the change and retain the original value
 
Method Summary
 void changed(ServerConfigurationService.ConfigItem configItem, ServerConfigurationService.ConfigItem previousConfigItem)
          This will be called each time a ServerConfigurationService.ConfigurationListener.BlockingConfigItem is changed, this will be called after the item has been changed and will reflect the new values for this config item NOTE: it does NOT include the the initial registration of that config item and initial startup of the ServerConfigurationService
 ServerConfigurationService.ConfigItem changing(ServerConfigurationService.ConfigItem currentConfigItem, ServerConfigurationService.ConfigItem newConfigItem)
          This will be called each time a ServerConfigurationService.ConfigurationListener.BlockingConfigItem is changed, this will be called before the item has been changed and will reflect the current values for this config item.
 

Method Detail

changing

ServerConfigurationService.ConfigItem changing(ServerConfigurationService.ConfigItem currentConfigItem,
                                               ServerConfigurationService.ConfigItem newConfigItem)
This will be called each time a ServerConfigurationService.ConfigurationListener.BlockingConfigItem is changed, this will be called before the item has been changed and will reflect the current values for this config item. NOTE: the default implementation of this should be to just return null if processing should be allowed to continue unimpeded NOTE: it does NOT include the the initial registration of that config item and initial startup of the ServerConfigurationService

Parameters:
currentConfigItem - the ServerConfigurationService.ConfigurationListener.BlockingConfigItem which is changing (will be null if item is new), this item should not be changed by this method
newConfigItem - the ServerConfigurationService.ConfigurationListener.BlockingConfigItem which will become the new one
Returns:
null to allow processing to continue as usual OR instance of ServerConfigurationService.ConfigurationListener.BlockingConfigItem to block the change from happening (change will be discarded and processing will stop) OR the modified newConfigItem item which will be used as the new config value

changed

void changed(ServerConfigurationService.ConfigItem configItem,
             ServerConfigurationService.ConfigItem previousConfigItem)
This will be called each time a ServerConfigurationService.ConfigurationListener.BlockingConfigItem is changed, this will be called after the item has been changed and will reflect the new values for this config item NOTE: it does NOT include the the initial registration of that config item and initial startup of the ServerConfigurationService

Parameters:
configItem - the ServerConfigurationService.ConfigurationListener.BlockingConfigItem which changed, this item should not be changed by this method
previousConfigItem - the ServerConfigurationService.ConfigurationListener.BlockingConfigItem before the change (will be null if item is new)


Copyright © 2003-2013 The Sakai Foundation. All Rights Reserved.