@Beta public interface NetworkConfigService extends ListenerService<NetworkConfigEvent,NetworkConfigListener>
Modifier and Type | Method and Description |
---|---|
<S,C extends Config<S>> |
addConfig(S subject,
java.lang.Class<C> configClass)
Creates a new configuration for the specified subject and configuration
class.
|
<S,C extends Config<S>> |
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.
|
<S,C extends Config<S>> |
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.
|
<S,C extends Config<S>> |
getConfig(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.
|
SubjectFactory |
getSubjectFactory(java.lang.Class subjectClass)
Returns the subject factory for the specified class.
|
SubjectFactory |
getSubjectFactory(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>> |
getSubjects(java.lang.Class<S> subjectClass,
java.lang.Class<C> configClass)
Returns the set of subjects for which the specified configuration is
available.
|
<S> void |
removeConfig()
Clears the complete configuration including queued.
|
<S> void |
removeConfig(S subject)
Clears the configuration including queued based on the subject.
|
<S,C extends Config<S>> |
removeConfig(S subject,
java.lang.Class<C> configClass)
Clears any configuration for the specified subject and configuration
class.
|
<S> void |
removeConfig(java.lang.String subjectClassKey,
S subject,
java.lang.String configKey)
Clears any configuration for the specified subject and configuration
key.
|
addListener, removeListener
java.util.Set<java.lang.Class> getSubjectClasses()
SubjectFactory getSubjectFactory(java.lang.String subjectClassKey)
subjectClassKey
- subject class keySubjectFactory getSubjectFactory(java.lang.Class subjectClass)
subjectClass
- subject classjava.lang.Class<? extends Config> getConfigClass(java.lang.String subjectClassKey, java.lang.String configKey)
subjectClassKey
- subject class keyconfigKey
- subject class name<S> java.util.Set<S> getSubjects(java.lang.Class<S> subjectClass)
S
- type of subjectsubjectClass
- subject class<S,C extends Config<S>> java.util.Set<S> getSubjects(java.lang.Class<S> subjectClass, java.lang.Class<C> configClass)
S
- type of subjectC
- type of configurationsubjectClass
- subject classconfigClass
- configuration class<S> java.util.Set<? extends Config<S>> getConfigs(S subject)
S
- type of subjectsubject
- configuration subject<S,C extends Config<S>> C getConfig(S subject, java.lang.Class<C> configClass)
S
- type of subjectC
- type of configurationsubject
- configuration subjectconfigClass
- configuration class<S,C extends Config<S>> C addConfig(S subject, java.lang.Class<C> configClass)
S
- type of subjectC
- type of configurationsubject
- configuration subjectconfigClass
- configuration class<S,C extends Config<S>> C applyConfig(S subject, java.lang.Class<C> configClass, com.fasterxml.jackson.databind.JsonNode json)
S
- type of subjectC
- type of configurationsubject
- configuration subjectconfigClass
- configuration classjson
- raw JSON node containing the configuration datajava.lang.IllegalArgumentException
- if the supplied JSON node contains
invalid data<S,C extends Config<S>> C applyConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey, com.fasterxml.jackson.databind.JsonNode json)
S
- type of subjectC
- type of configurationsubjectClassKey
- subject class keysubject
- configuration subjectconfigKey
- configuration class keyjson
- raw JSON node containing the configuration datajava.lang.IllegalArgumentException
- if the supplied JSON node contains
invalid data<S,C extends Config<S>> void removeConfig(S subject, java.lang.Class<C> configClass)
S
- type of subjectC
- type of configurationsubject
- configuration subjectconfigClass
- configuration class<S> void removeConfig(java.lang.String subjectClassKey, S subject, java.lang.String configKey)
S
- type of subjectsubjectClassKey
- subject class keysubject
- configuration subjectconfigKey
- configuration key<S> void removeConfig(S subject)
S
- type of subjectsubject
- configuration subject<S> void removeConfig()
S
- type of subject