Package org.onosproject.net.config
Interface NetworkConfigRegistry
-
- All Superinterfaces:
ListenerService<NetworkConfigEvent,NetworkConfigListener>
,NetworkConfigService
- All Known Implementing Classes:
NetworkConfigRegistryAdapter
@Beta public interface NetworkConfigRegistry extends NetworkConfigService
Service for tracking network configuration factories. It is the basis for extensibility to allow various core subsystems or apps to register their own configuration factories that permit use to inject additional meta information about how various parts of the network should be viewed and treated.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<ConfigFactory>
getConfigFactories()
Returns set of all registered configuration factories.<S,C extends Config<S>>
Set<ConfigFactory<S,C>>getConfigFactories(Class<S> subjectClass)
Returns set of all configuration factories registered for the specified class of subject.<S,C extends Config<S>>
ConfigFactory<S,C>getConfigFactory(Class<C> configClass)
Returns the configuration factory that produces the specified class of configurations.void
registerConfigFactory(ConfigFactory configFactory)
Registers the specified configuration factory.void
unregisterConfigFactory(ConfigFactory configFactory)
Unregisters the specified configuration factory.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
Methods inherited from interface org.onosproject.net.config.NetworkConfigService
addConfig, applyConfig, applyConfig, getConfig, getConfigClass, getConfigs, getSubjectClasses, getSubjectFactory, getSubjectFactory, getSubjects, getSubjects, removeConfig, removeConfig, removeConfig, removeConfig
-
-
-
-
Method Detail
-
registerConfigFactory
void registerConfigFactory(ConfigFactory configFactory)
Registers the specified configuration factory.- Parameters:
configFactory
- configuration factory
-
unregisterConfigFactory
void unregisterConfigFactory(ConfigFactory configFactory)
Unregisters the specified configuration factory.- Parameters:
configFactory
- configuration factory
-
getConfigFactories
Set<ConfigFactory> getConfigFactories()
Returns set of all registered configuration factories.- Returns:
- set of config factories
-
getConfigFactories
<S,C extends Config<S>> Set<ConfigFactory<S,C>> getConfigFactories(Class<S> subjectClass)
Returns set of all configuration factories registered for the specified class of subject.- Type Parameters:
S
- type of subjectC
- type of configuration- Parameters:
subjectClass
- subject class- Returns:
- set of config factories
-
getConfigFactory
<S,C extends Config<S>> ConfigFactory<S,C> getConfigFactory(Class<C> configClass)
Returns the configuration factory that produces the specified class of configurations.- Type Parameters:
S
- type of subjectC
- type of configuration- Parameters:
configClass
- configuration class- Returns:
- config factory
-
-