Class DynamicServiceInstanceProvider
java.lang.Object
org.springframework.cloud.client.hypermedia.DynamicServiceInstanceProvider
- All Implemented Interfaces:
ServiceInstanceProvider
ServiceInstanceProvider
to work with a DiscoveryClient
to look up a
service by name. Picks the first one returned by the configured
DiscoveryClient
.- Author:
- Oliver Gierke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the service instance or null if the service is currently unavailable.
-
Constructor Details
-
DynamicServiceInstanceProvider
-
-
Method Details
-
getServiceInstance
Description copied from interface:ServiceInstanceProvider
Returns the service instance or null if the service is currently unavailable.- Specified by:
getServiceInstance
in interfaceServiceInstanceProvider
- Returns:
- The service instance, or null if the service is currently unavailable.
-