Class SimpleReactiveDiscoveryClient
- java.lang.Object
-
- org.springframework.cloud.client.discovery.simple.reactive.SimpleReactiveDiscoveryClient
-
- All Implemented Interfaces:
ReactiveDiscoveryClient,org.springframework.core.Ordered
public class SimpleReactiveDiscoveryClient extends Object implements ReactiveDiscoveryClient
AReactiveDiscoveryClientthat will use the properties file as a source of service instances.- 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 SimpleReactiveDiscoveryClient(SimpleReactiveDiscoveryProperties simpleDiscoveryProperties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringdescription()A human-readable description of the implementation, used in HealthIndicator.reactor.core.publisher.Flux<ServiceInstance>getInstances(String serviceId)Gets all ServiceInstances associated with a particular serviceId.intgetOrder()Default implementation for getting order of discovery clients.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
probe, reactiveProbe
-
-
-
-
Constructor Detail
-
SimpleReactiveDiscoveryClient
public SimpleReactiveDiscoveryClient(SimpleReactiveDiscoveryProperties simpleDiscoveryProperties)
-
-
Method Detail
-
description
public String description()
Description copied from interface:ReactiveDiscoveryClientA human-readable description of the implementation, used in HealthIndicator.- Specified by:
descriptionin interfaceReactiveDiscoveryClient- Returns:
- The description.
-
getInstances
public reactor.core.publisher.Flux<ServiceInstance> getInstances(String serviceId)
Description copied from interface:ReactiveDiscoveryClientGets all ServiceInstances associated with a particular serviceId.- Specified by:
getInstancesin interfaceReactiveDiscoveryClient- Parameters:
serviceId- The serviceId to query.- Returns:
- A List of ServiceInstance.
-
getServices
public reactor.core.publisher.Flux<String> getServices()
- Specified by:
getServicesin interfaceReactiveDiscoveryClient- Returns:
- All known service IDs.
-
getOrder
public int getOrder()
Description copied from interface:ReactiveDiscoveryClientDefault implementation for getting order of discovery clients.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Specified by:
getOrderin interfaceReactiveDiscoveryClient- Returns:
- order
-
-