Package io.smallrye.stork.spi
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 Summary
Modifier and TypeMethodDescription<T> TGet an instance of a "utility" classdefault ObservationCollector
-
Method Details
-
get
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
-