Class TenantComponentParameterResolverFactoryConfigurationEnhancer
- All Implemented Interfaces:
ConfigurationEnhancer
TenantComponentParameterResolverFactory to the
ComponentRegistry of the Configuration.
Contributed through the ServiceLoader, so handler parameters annotated with TenantScoped
resolve as soon as the axoniq-multi-tenancy module is on the classpath. This enhancer keeps running even
when multi-tenancy is switched off, because an unresolvable parameter fails handler inspection and with it the whole
configuration.
Deliberately carries neither an ConfigurationEnhancer.order() nor a
RegistrationScope. An earlier order makes
ParameterResolverFactoryUtils.registerToComponentRegistry(ComponentRegistry, java.util.function.Function)
contribute the factory as the registry's ParameterResolverFactory component rather than as a decorator on
it, and a CURRENT scope stops this enhancer running again for a child registry. A child registry copies
enhancers and decorators but not components, and a module resolves handler parameters with its own registry's
factory, so restricting either one costs handlers inside a module their tenant-scoped parameters.
- Since:
- 5.3.0
- Author:
- Jakob Hatzl
-
Constructor Details
-
TenantComponentParameterResolverFactoryConfigurationEnhancer
public TenantComponentParameterResolverFactoryConfigurationEnhancer()
-
-
Method Details
-
enhance
Description copied from interface:ConfigurationEnhancer- Specified by:
enhancein interfaceConfigurationEnhancer- Parameters:
registry- The registry instance to enhance.
-