Class UnionDiscoveryClient

java.lang.Object
io.microsphere.spring.cloud.client.discovery.UnionDiscoveryClient
All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.cloud.client.discovery.DiscoveryClient, org.springframework.core.Ordered

public final class UnionDiscoveryClient extends Object implements org.springframework.cloud.client.discovery.DiscoveryClient, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.beans.factory.DisposableBean
The DiscoveryClient implementation for a union of the given DiscoveryClient
Since:
1.0.0
Author:
Mercy
See Also:
  • CompositeDiscoveryClient
  • Constructor Details

    • UnionDiscoveryClient

      public UnionDiscoveryClient(org.springframework.beans.factory.ObjectProvider<org.springframework.cloud.client.discovery.DiscoveryClient> discoveryClientsProvider)
  • Method Details

    • description

      public String description()
      Specified by:
      description in interface org.springframework.cloud.client.discovery.DiscoveryClient
    • getInstances

      public List<org.springframework.cloud.client.ServiceInstance> getInstances(String serviceId)
      Specified by:
      getInstances in interface org.springframework.cloud.client.discovery.DiscoveryClient
    • getServices

      public List<String> getServices()
      Specified by:
      getServices in interface org.springframework.cloud.client.discovery.DiscoveryClient
    • getDiscoveryClients

      public List<org.springframework.cloud.client.discovery.DiscoveryClient> getDiscoveryClients()
    • getOrder

      public int getOrder()
      Specified by:
      getOrder in interface org.springframework.cloud.client.discovery.DiscoveryClient
      Specified by:
      getOrder in interface org.springframework.core.Ordered
    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • destroy

      public void destroy() throws Exception
      Specified by:
      destroy in interface org.springframework.beans.factory.DisposableBean
      Throws:
      Exception