Package io.smallrye.config
Class ProfileConfigSourceInterceptor
- java.lang.Object
-
- io.smallrye.config.ProfileConfigSourceInterceptor
-
- All Implemented Interfaces:
ConfigSourceInterceptor,Serializable
@Priority(3200) public class ProfileConfigSourceInterceptor extends Object implements ConfigSourceInterceptor
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from interface io.smallrye.config.ConfigSourceInterceptor
EMPTY
-
-
Constructor Summary
Constructors Constructor Description ProfileConfigSourceInterceptor(String profile)ProfileConfigSourceInterceptor(List<String> profiles)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<String>convertProfile(String profile)String[]getProfiles()ConfigValuegetProfileValue(ConfigSourceInterceptorContext context, String normalizeName)ConfigValuegetValue(ConfigSourceInterceptorContext context, String name)Intercept the resolution of a configuration name and either return the correspondingConfigValueor a customConfigValuebuilt by the interceptor.Iterator<String>iterateNames(ConfigSourceInterceptorContext context)Intercept the resolution of the configuration names.Iterator<ConfigValue>iterateValues(ConfigSourceInterceptorContext context)Intercept the resolution of the configurationConfigValue.StringnormalizeName(String name)
-
-
-
Method Detail
-
getValue
public ConfigValue getValue(ConfigSourceInterceptorContext context, String name)
Description copied from interface:ConfigSourceInterceptorIntercept the resolution of a configuration name and either return the correspondingConfigValueor a customConfigValuebuilt by the interceptor. CallingConfigSourceInterceptorContext.proceed(String)will continue to execute the interceptor chain. The chain can be short-circuited by returning another instance ofConfigValue.- Specified by:
getValuein interfaceConfigSourceInterceptor- Parameters:
context- the interceptor context. SeeConfigSourceInterceptorContextname- the configuration name being intercepted.- Returns:
- a
ConfigValuewith information about the name, value, config source and ordinal, ornullif the value isn't present.
-
getProfileValue
public ConfigValue getProfileValue(ConfigSourceInterceptorContext context, String normalizeName)
-
iterateNames
public Iterator<String> iterateNames(ConfigSourceInterceptorContext context)
Description copied from interface:ConfigSourceInterceptorIntercept the resolution of the configuration names. The Iterator names may be a subset of the total names retrieved from all the registered ConfigSources. CallingConfigSourceInterceptorContext.iterateNames()will continue to execute the interceptor chain. The chain can be short-circuited by returning another instance of the Iterator.- Specified by:
iterateNamesin interfaceConfigSourceInterceptor- Parameters:
context- the interceptor context. SeeConfigSourceInterceptorContext- Returns:
- an Iterator of Strings with configuration names.
-
iterateValues
public Iterator<ConfigValue> iterateValues(ConfigSourceInterceptorContext context)
Description copied from interface:ConfigSourceInterceptorIntercept the resolution of the configurationConfigValue. CallingConfigSourceInterceptorContext.iterateNames()will continue to execute the interceptor chain. The chain can be short-circuited by returning another instance of the Iterator.- Specified by:
iterateValuesin interfaceConfigSourceInterceptor- Parameters:
context- the interceptor context. SeeConfigSourceInterceptorContext- Returns:
- an Iterator of
ConfigValuewith information about the name, value, config source and ordinal.
-
getProfiles
public String[] getProfiles()
-
-