Package org.onosproject.net.config
Interface NetworkConfigService
- 
- All Superinterfaces:
- ListenerService<NetworkConfigEvent,NetworkConfigListener>
 - All Known Subinterfaces:
- NetworkConfigRegistry
 - All Known Implementing Classes:
- NetworkConfigRegistryAdapter,- NetworkConfigServiceAdapter
 
 @Beta public interface NetworkConfigService extends ListenerService<NetworkConfigEvent,NetworkConfigListener> Service for tracking network configurations which specify how the discovered network information should be interpreted and how the core or applications should act on or configure the network.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description <S,C extends Config<S>>
 CaddConfig(S subject, java.lang.Class<C> configClass)Creates a new configuration for the specified subject and configuration class.<S,C extends Config<S>>
 CapplyConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey, com.fasterxml.jackson.databind.JsonNode json)Applies configuration for the specified subject and configuration key using the raw JSON object.<S,C extends Config<S>>
 CapplyConfig(S subject, java.lang.Class<C> configClass, com.fasterxml.jackson.databind.JsonNode json)Applies configuration for the specified subject and configuration class using the raw JSON node.<S,C extends Config<S>>
 CgetConfig(S subject, java.lang.Class<C> configClass)Returns the configuration for the specified subject and configuration class if one is available; null otherwise.java.lang.Class<? extends Config>getConfigClass(java.lang.String subjectClassKey, java.lang.String configKey)Returns the configuration class with the specified key.<S> java.util.Set<? extends Config<S>>getConfigs(S subject)Returns all configurations for the specified subject.java.util.Set<java.lang.Class>getSubjectClasses()Returns the set of subject classes for which configuration may be available.SubjectFactorygetSubjectFactory(java.lang.Class subjectClass)Returns the subject factory for the specified class.SubjectFactorygetSubjectFactory(java.lang.String subjectClassKey)Returns the subject factory with the specified key.<S> java.util.Set<S>getSubjects(java.lang.Class<S> subjectClass)Returns the set of subjects for which some configuration is available.<S,C extends Config<S>>
 java.util.Set<S>getSubjects(java.lang.Class<S> subjectClass, java.lang.Class<C> configClass)Returns the set of subjects for which the specified configuration is available.<S> voidremoveConfig()Clears the complete configuration including queued.<S> voidremoveConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey)Clears any configuration for the specified subject and configuration key.<S> voidremoveConfig(S subject)Clears the configuration including queued based on the subject.<S,C extends Config<S>>
 voidremoveConfig(S subject, java.lang.Class<C> configClass)Clears any configuration for the specified subject and configuration class.- 
Methods inherited from interface org.onosproject.event.ListenerServiceaddListener, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getSubjectClassesjava.util.Set<java.lang.Class> getSubjectClasses() Returns the set of subject classes for which configuration may be available.- Returns:
- set of subject classes
 
 - 
getSubjectFactorySubjectFactory getSubjectFactory(java.lang.String subjectClassKey) Returns the subject factory with the specified key.- Parameters:
- subjectClassKey- subject class key
- Returns:
- subject class
 
 - 
getSubjectFactorySubjectFactory getSubjectFactory(java.lang.Class subjectClass) Returns the subject factory for the specified class.- Parameters:
- subjectClass- subject class
- Returns:
- subject class factory
 
 - 
getConfigClassjava.lang.Class<? extends Config> getConfigClass(java.lang.String subjectClassKey, java.lang.String configKey) Returns the configuration class with the specified key.- Parameters:
- subjectClassKey- subject class key
- configKey- subject class name
- Returns:
- subject class
 
 - 
getSubjects<S> java.util.Set<S> getSubjects(java.lang.Class<S> subjectClass) Returns the set of subjects for which some configuration is available.- Type Parameters:
- S- type of subject
- Parameters:
- subjectClass- subject class
- Returns:
- set of configured subjects
 
 - 
getSubjects<S,C extends Config<S>> java.util.Set<S> getSubjects(java.lang.Class<S> subjectClass, java.lang.Class<C> configClass) Returns the set of subjects for which the specified configuration is available.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subjectClass- subject class
- configClass- configuration class
- Returns:
- set of configured subjects
 
 - 
getConfigs<S> java.util.Set<? extends Config<S>> getConfigs(S subject) Returns all configurations for the specified subject.- Type Parameters:
- S- type of subject
- Parameters:
- subject- configuration subject
- Returns:
- set of configurations
 
 - 
getConfig<S,C extends Config<S>> C getConfig(S subject, java.lang.Class<C> configClass) Returns the configuration for the specified subject and configuration class if one is available; null otherwise.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subject- configuration subject
- configClass- configuration class
- Returns:
- configuration or null if one is not available
 
 - 
addConfig<S,C extends Config<S>> C addConfig(S subject, java.lang.Class<C> configClass) Creates a new configuration for the specified subject and configuration class. If one already exists, it is simply returned.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subject- configuration subject
- configClass- configuration class
- Returns:
- configuration or null if one is not available
 
 - 
applyConfig<S,C extends Config<S>> C applyConfig(S subject, java.lang.Class<C> configClass, com.fasterxml.jackson.databind.JsonNode json) Applies configuration for the specified subject and configuration class using the raw JSON node. If configuration already exists, it will be updated.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subject- configuration subject
- configClass- configuration class
- json- raw JSON node containing the configuration data
- Returns:
- configuration or null if one is not available
- Throws:
- java.lang.IllegalArgumentException- if the supplied JSON node contains invalid data
 
 - 
applyConfig<S,C extends Config<S>> C applyConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey, com.fasterxml.jackson.databind.JsonNode json) Applies configuration for the specified subject and configuration key using the raw JSON object. If configuration already exists, it will be updated. If the specified configuration key does not yet have a registered class associated with it, the configuration will be pending and null value will be returned. Once the backing configuration class is registered, the configuration will be validated and accepted.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subjectClassKey- subject class key
- subject- configuration subject
- configKey- configuration class key
- json- raw JSON node containing the configuration data
- Returns:
- configuration object or null if configuration key does not have a registered class yet
- Throws:
- java.lang.IllegalArgumentException- if the supplied JSON node contains invalid data
 
 - 
removeConfig<S,C extends Config<S>> void removeConfig(S subject, java.lang.Class<C> configClass) Clears any configuration for the specified subject and configuration class. If one does not exist, this call has no effect.- Type Parameters:
- S- type of subject
- C- type of configuration
- Parameters:
- subject- configuration subject
- configClass- configuration class
 
 - 
removeConfig<S> void removeConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey)Clears any configuration for the specified subject and configuration key. If one does not exist, this call has no effect.- Type Parameters:
- S- type of subject
- Parameters:
- subjectClassKey- subject class key
- subject- configuration subject
- configKey- configuration key
 
 - 
removeConfig<S> void removeConfig(S subject) Clears the configuration including queued based on the subject. If does not exists this call has no effect.- Type Parameters:
- S- type of subject
- Parameters:
- subject- configuration subject
 
 - 
removeConfig<S> void removeConfig() Clears the complete configuration including queued. If does not exists this call has no effect.- Type Parameters:
- S- type of subject
 
 
- 
 
-