Interface ContributorRegistry<C>

Type Parameters:
C - the contributor type
All Superinterfaces:
Iterable<NamedContributor<C>>, NamedContributors<C>
All Known Subinterfaces:
HealthContributorRegistry, ReactiveHealthContributorRegistry
All Known Implementing Classes:
DefaultHealthContributorRegistry, DefaultReactiveHealthContributorRegistry

public interface ContributorRegistry<C> extends NamedContributors<C>
A mutable registry of health endpoint contributors (either HealthContributor or ReactiveHealthContributor).
Since:
2.2.0
Author:
Phillip Webb, Andy Wilkinson, Vedran Pavic, Stephane Nicoll
See Also:
  • Method Details

    • registerContributor

      void registerContributor(String name, C contributor)
      Register a contributor with the given name.
      Parameters:
      name - the name of the contributor
      contributor - the contributor to register
      Throws:
      IllegalStateException - if the contributor cannot be registered with the given name.
    • unregisterContributor

      C unregisterContributor(String name)
      Unregister a previously registered contributor.
      Parameters:
      name - the name of the contributor to unregister
      Returns:
      the unregistered indicator, or null if no indicator was found in the registry for the given name.