Package io.smallrye.stork.spi
Interface StorkInfrastructure
-
public interface StorkInfrastructureA provider for "utility" objects used by service discovery and load balancer implementations. The default implementation,DefaultStorkInfrastructureprovides 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 Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T> Tget(Class<T> utilityClass, Supplier<T> defaultSupplier)Get an instance of a "utility" classdefault ObservationCollectorgetObservationCollector()
-
-
-
Method Detail
-
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 objectdefaultSupplier- 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()
-
-