Class TenantComponentProviderUtil
java.lang.Object
io.axoniq.framework.messaging.multitenancy.configuration.TenantComponentProviderUtil
Finds
TenantComponentProviders registered in a configuration hierarchy.
Internal because providers are application components while this class only implements the framework's discovery rules for infrastructure that consumes them.
- Since:
- 5.3.1
- Author:
- Jan Galinski
-
Method Summary
Modifier and TypeMethodDescriptionstatic Iterable<TenantComponentProvider> all(Configuration configuration) Returns every tenant-component provider visible from the given configuration.static <T> Optional<TenantComponentProvider<T>> find(Configuration configuration, Class<T> componentType) Finds the provider registered for the given component type.
-
Method Details
-
all
Returns every tenant-component provider visible from the given configuration.- Parameters:
configuration- the configuration from which to resolve the root configuration- Returns:
- every provider registered in the root configuration and its modules
-
find
public static <T> Optional<TenantComponentProvider<T>> find(Configuration configuration, Class<T> componentType) Finds the provider registered for the given component type.- Type Parameters:
T- the component type- Parameters:
configuration- the configuration from which to resolve providerscomponentType- the component type of the provider to find- Returns:
- the provider for the component type, if one is registered
- Throws:
AxonConfigurationException- if more than one provider exposes the component type
-