Package io.smallrye.stork.utils
Class ServiceInstanceUtils
- java.lang.Object
-
- io.smallrye.stork.utils.ServiceInstanceUtils
-
public class ServiceInstanceUtils extends Object
A set of utility methods aroundServiceInstance.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ServiceInstancefindMatching(Collection<ServiceInstance> serviceInstances, String hostname, int port)Finds a matching instance for a given hostname and port
-
-
-
Method Detail
-
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
-
-