Package io.smallrye.stork.utils
Class ServiceInstanceUtils
java.lang.Object
io.smallrye.stork.utils.ServiceInstanceUtils
A set of utility methods around
ServiceInstance.-
Method Summary
Modifier and TypeMethodDescriptionstatic ServiceInstancefindMatching(Collection<ServiceInstance> serviceInstances, String hostname, int port) Finds a matching instance for a given hostname and port
-
Method Details
-
findMatching
public static ServiceInstance findMatching(Collection<ServiceInstance> serviceInstances, String hostname, int port) Finds a matching instance for a given hostname and port- Parameters:
serviceInstances- the list of instanceshostname- the hostnameport- the port- Returns:
- the found instance or
nullif none matches
-