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:
-
Field Summary
Fields inherited from interface io.smallrye.config.ConfigSourceInterceptor
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionProfileConfigSourceInterceptor(String profile) ProfileConfigSourceInterceptor(List<String> profiles) -
Method Summary
Modifier and TypeMethodDescriptionstatic StringactiveName(String name, List<String> profiles) convertProfile(String profile) getProfileValue(ConfigSourceInterceptorContext context, String normalizeName) getValue(ConfigSourceInterceptorContext context, String name) Intercept the resolution of a configuration name and either return the correspondingConfigValueor a customConfigValuebuilt by the interceptor.Intercept the resolution of the configuration names.
-
Constructor Details
-
ProfileConfigSourceInterceptor
-
ProfileConfigSourceInterceptor
-
-
Method Details
-
getValue
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
-
iterateNames
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.
-
getProfiles
-
activeName
-
convertProfile
-