Interface TenantProvider

All Superinterfaces:
TenantDescriptors
All Known Implementing Classes:
AxonServerTenantProvider

public interface TenantProvider extends TenantDescriptors
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 Details

    • subscribe

      Subscribes the given component with 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 Registration unsubscribes 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 subscribed MultiTenantAwareComponent for tenant changes.
      Returns:
      the registration for the given component.
    • tenants

      Get the list of registered tenants with this provided.
      Specified by:
      tenants in interface TenantDescriptors
      Returns:
      The list of registered tenants.