Class SimpleDiscoveryClient
java.lang.Object
org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClient
- All Implemented Interfaces:
DiscoveryClient
,org.springframework.core.Ordered
A
DiscoveryClient
that will use the
properties file as a source of service instances.- Author:
- Biju Kunjummen, Olga Maciaszek-Sharma, Charu Covindane
-
Field Summary
Fields inherited from interface org.springframework.cloud.client.discovery.DiscoveryClient
DEFAULT_ORDER
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of the implementation, used in HealthIndicator.getInstances
(String serviceId) Gets all ServiceInstances associated with a particular serviceId.int
getOrder()
Default implementation for getting order of discovery clients.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.cloud.client.discovery.DiscoveryClient
probe
-
Constructor Details
-
SimpleDiscoveryClient
-
-
Method Details
-
description
Description copied from interface:DiscoveryClient
A human-readable description of the implementation, used in HealthIndicator.- Specified by:
description
in interfaceDiscoveryClient
- Returns:
- The description.
-
getInstances
Description copied from interface:DiscoveryClient
Gets all ServiceInstances associated with a particular serviceId.- Specified by:
getInstances
in interfaceDiscoveryClient
- Parameters:
serviceId
- The serviceId to query.- Returns:
- A List of ServiceInstance.
-
getServices
- Specified by:
getServices
in interfaceDiscoveryClient
- Returns:
- All known service IDs.
-
getOrder
public int getOrder()Description copied from interface:DiscoveryClient
Default implementation for getting order of discovery clients.- Specified by:
getOrder
in interfaceDiscoveryClient
- Specified by:
getOrder
in interfaceorg.springframework.core.Ordered
- Returns:
- order
-