Interface TenantProvider
- All Superinterfaces:
TenantDescriptors
- All Known Implementing Classes:
AxonServerTenantProvider
Contract towards a component that provisions the registered set of
tenants and
MultiTenantAwareComponents.
Depending on the implementation the provider can monitor tenant changes and update the
MultiTenantAwareComponents accordingly.
- Since:
- 4.6.0
- Author:
- Stefan Dragisic
-
Method Summary
Modifier and TypeMethodDescriptionsubscribe(MultiTenantAwareComponent component) Subscribes the givencomponentwith this provider.tenants()Get the list of registeredtenantswith this provided.Methods inherited from interface io.axoniq.framework.messaging.multitenancy.api.TenantDescriptors
isKnown
-
Method Details
-
subscribe
Subscribes the givencomponentwith this provider.Tenants known to this provider are replayed to the component on subscription, and tenants added or removed afterwards reach the component through its registration hooks. Cancelling the returned
Registrationunsubscribes the component and cancels the tenant registrations made on its behalf, giving the component the opportunity to release its per-tenant resources.- Parameters:
component- to be subscribedMultiTenantAwareComponentfor tenant changes.- Returns:
- the registration for the given component.
-
tenants
List<TenantDescriptor> tenants()Get the list of registeredtenantswith this provided.- Specified by:
tenantsin interfaceTenantDescriptors- Returns:
- The list of registered
tenants.
-