Interface ConfigSourceInterceptor

All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractMappingConfigSourceInterceptor, ExpressionConfigSourceInterceptor, FallbackConfigSourceInterceptor, LoggingConfigSourceInterceptor, ProfileConfigSourceInterceptor, RelocateConfigSourceInterceptor, SecretKeysConfigSourceInterceptor

public interface ConfigSourceInterceptor extends Serializable
The ConfigSourceInterceptor allows to intercept the resolution of a configuration name before the configuration value is resolved by the Config and before any conversion taking place. It can also intercept iteration of configuration names and values.

This is useful to provide logging, transform names or substitute values.

Implementations of ConfigSourceInterceptor are loaded via the ServiceLoader mechanism and can be registered by providing a resource named META-INF/services/io.smallrye.config.ConfigSourceInterceptor, which contains the fully qualified ConfigSourceInterceptor implementation class name as its content.

Alternatively, a ConfigSourceInterceptor can also be loaded with a ConfigSourceInterceptorFactory.

A ConfigSourceInterceptor implementation class can specify a priority by way of the standard jakarta.annotation.Priority annotation. If no priority is explicitly assigned, the default priority value of io.smallrye.config.Priorities#APPLICATION is assumed. If multiple interceptors are registered with the same priority, then their execution order may be non deterministic.