Class SimpleDiscoveryClient

java.lang.Object
org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClient
All Implemented Interfaces:
DiscoveryClient, org.springframework.core.Ordered

public class SimpleDiscoveryClient extends Object implements DiscoveryClient
A DiscoveryClient that will use the properties file as a source of service instances.
Author:
Biju Kunjummen, Olga Maciaszek-Sharma, Charu Covindane
  • Constructor Details

  • Method Details

    • description

      public String description()
      Description copied from interface: DiscoveryClient
      A human-readable description of the implementation, used in HealthIndicator.
      Specified by:
      description in interface DiscoveryClient
      Returns:
      The description.
    • getInstances

      public List<ServiceInstance> getInstances(String serviceId)
      Description copied from interface: DiscoveryClient
      Gets all ServiceInstances associated with a particular serviceId.
      Specified by:
      getInstances in interface DiscoveryClient
      Parameters:
      serviceId - The serviceId to query.
      Returns:
      A List of ServiceInstance.
    • getServices

      public List<String> getServices()
      Specified by:
      getServices in interface DiscoveryClient
      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 interface DiscoveryClient
      Specified by:
      getOrder in interface org.springframework.core.Ordered
      Returns:
      order