@Experimental(value="Interceptor API to intercept resolution of a configuration name")
public interface ConfigSourceInterceptorFactory
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_PRIORITY
The default priority value,
Priorities.APPLICATION. |
| Modifier and Type | Method and Description |
|---|---|
ConfigSourceInterceptor |
getInterceptor(ConfigSourceInterceptorContext context)
Gets the
ConfigSourceInterceptor from the ConfigSourceInterceptorFactory. |
default OptionalInt |
getPriority()
Returns the interceptor priority.
|
static final int DEFAULT_PRIORITY
Priorities.APPLICATION.ConfigSourceInterceptor getInterceptor(ConfigSourceInterceptorContext context)
ConfigSourceInterceptor from the ConfigSourceInterceptorFactory. Implementations of this
method must provide the instance of the ConfigSourceInterceptor to add into the Config Interceptor Chain.context - the current ConfigSourceInterceptorContext with the interceptors already initialized.ConfigSourceInterceptor to add to Config Interceptor Chain and initialize.default OptionalInt getPriority()
Copyright © 2018–2021. All rights reserved.