Interface ComponentLookup

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ComponentLookup
A lookup allowing to determine early whether a given component can be made available, and (if relevant) why not.

Component here is meant in a very abstract way, for example "a datasource"; depending on context, this may translate into one or more CDI beans as well as other, CDI-independent build-time or runtime objects.

Note: lookups are meant to take into account basic, critical configuration, and provide information on a best-effort basis. Subtle misconfiguration of a component can still result in its creation erroring out even if the lookup advertises it as available.

  • Method Details

    • of

      static ComponentLookup of(List<ComponentLookup> delegates)
      Parameters:
      delegates - Multiple component lookups from various sources.
      Returns:
      A lookup that will aggregate "unavailable reasons" from all delegates, deeming a component available only if all the delegates deem it available.
    • availableParadigms

      default Set<io.quarkus.runtime.util.ProgrammingParadigm> availableParadigms(String name)
    • unavailableReasons

      List<io.quarkus.runtime.util.Reason> unavailableReasons(String name, io.quarkus.runtime.util.ProgrammingParadigm paradigm)