Interface StorkInfrastructure


public interface StorkInfrastructure
A provider for "utility" objects used by service discovery and load balancer implementations. The default implementation, DefaultStorkInfrastructure provides objects created by the passed supplier. Vendors can implement their own version of this class to provide custom objects. E.g. Quarkus uses a single Vert.x instance throughout the project and overrides this to return this Vert.x instance
  • Method Details

    • get

      <T> T get(Class<T> utilityClass, Supplier<T> defaultSupplier)
      Get an instance of a "utility" class
      Type Parameters:
      T - type of the utility object
      Parameters:
      utilityClass - class of the requested object
      defaultSupplier - should be used by the implementation to create an object if the environment doesn't provide one, the result value can be cached.
      Returns:
      the utility object
      Throws:
      NullPointerException - if utilityClass or defaultSupplier are null
    • getObservationCollector

      default ObservationCollector getObservationCollector()