Class ReactiveCompositeDiscoveryClient
- java.lang.Object
-
- org.springframework.cloud.client.discovery.composite.reactive.ReactiveCompositeDiscoveryClient
-
- All Implemented Interfaces:
ReactiveDiscoveryClient
,org.springframework.core.Ordered
public class ReactiveCompositeDiscoveryClient extends Object implements ReactiveDiscoveryClient
AReactiveDiscoveryClient
that is composed of other discovery clients and delegates calls to each of them in order.- Author:
- Tim Ysewyn
-
-
Field Summary
-
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Fields inherited from interface org.springframework.cloud.client.discovery.ReactiveDiscoveryClient
DEFAULT_ORDER, LOG
-
-
Constructor Summary
Constructors Constructor Description ReactiveCompositeDiscoveryClient(List<ReactiveDiscoveryClient> discoveryClients)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
description()
A human-readable description of the implementation, used in HealthIndicator.List<ReactiveDiscoveryClient>
getDiscoveryClients()
reactor.core.publisher.Flux<ServiceInstance>
getInstances(String serviceId)
Gets all ServiceInstances associated with a particular serviceId.reactor.core.publisher.Flux<String>
getServices()
-
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.ReactiveDiscoveryClient
getOrder, probe, reactiveProbe
-
-
-
-
Constructor Detail
-
ReactiveCompositeDiscoveryClient
public ReactiveCompositeDiscoveryClient(List<ReactiveDiscoveryClient> discoveryClients)
-
-
Method Detail
-
description
public String description()
Description copied from interface:ReactiveDiscoveryClient
A human-readable description of the implementation, used in HealthIndicator.- Specified by:
description
in interfaceReactiveDiscoveryClient
- Returns:
- The description.
-
getInstances
public reactor.core.publisher.Flux<ServiceInstance> getInstances(String serviceId)
Description copied from interface:ReactiveDiscoveryClient
Gets all ServiceInstances associated with a particular serviceId.- Specified by:
getInstances
in interfaceReactiveDiscoveryClient
- Parameters:
serviceId
- The serviceId to query.- Returns:
- A List of ServiceInstance.
-
getServices
public reactor.core.publisher.Flux<String> getServices()
- Specified by:
getServices
in interfaceReactiveDiscoveryClient
- Returns:
- All known service IDs.
-
getDiscoveryClients
public List<ReactiveDiscoveryClient> getDiscoveryClients()
-
-