Package io.smallrye.config
Interface ConfigSourceInterceptorFactory
public interface ConfigSourceInterceptorFactory
This ConfigSourceInterceptorFactory allows to initialize a
ConfigSourceInterceptor, with access to the
current ConfigSourceInterceptorContext.
Interceptors in the chain are initialized in priority order and the current
ConfigSourceInterceptorContext contains the current interceptor, plus all other interceptors already
initialized.
Instances of this interface will be discovered by SmallRyeConfigBuilder.addDiscoveredInterceptors() via the
ServiceLoader mechanism and can be registered by providing a
META-INF/services/io.smallrye.config.ConfigSourceInterceptorFactory which contains the fully qualified class
name of the custom ConfigSourceInterceptor implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe default priority value,Priorities.APPLICATION. -
Method Summary
Modifier and TypeMethodDescriptionGets theConfigSourceInterceptorfrom the ConfigSourceInterceptorFactory.default OptionalIntReturns the interceptor priority.
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYThe default priority value,Priorities.APPLICATION.- See Also:
-
-
Method Details
-
getInterceptor
Gets theConfigSourceInterceptorfrom the ConfigSourceInterceptorFactory. Implementations of this method must provide the instance of theConfigSourceInterceptorto add into the Config Interceptor Chain.- Parameters:
context- the currentConfigSourceInterceptorContextwith the interceptors already initialized.- Returns:
- the
ConfigSourceInterceptorto add to Config Interceptor Chain and initialize.
-
getPriority
Returns the interceptor priority. This is required, because the interceptor priority needs to be sorted before doing initialization.- Returns:
- the priority value.
-