Interface ReactiveDiscoveryClient
-
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
ReactiveCompositeDiscoveryClient,SimpleReactiveDiscoveryClient
public interface ReactiveDiscoveryClient extends org.springframework.core.OrderedRepresents read operations commonly available to discovery services such as Netflix Eureka or consul.io.- Author:
- Tim Ysewyn, Olga Maciaszek-Sharma
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_ORDERDefault order of the discovery client.static org.apache.commons.logging.LogLOG
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated 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.default intgetOrder()Default implementation for getting order of discovery clients.reactor.core.publisher.Flux<String>getServices()default voidprobe()Deprecated.in favour ofreactiveProbe().default reactor.core.publisher.Mono<Void>reactiveProbe()Can be used to verify the client is still valid and able to make calls.
-
-
-
Field Detail
-
LOG
static final org.apache.commons.logging.Log LOG
-
DEFAULT_ORDER
static final int DEFAULT_ORDER
Default order of the discovery client.- See Also:
- Constant Field Values
-
-
Method Detail
-
description
String description()
A human-readable description of the implementation, used in HealthIndicator.- Returns:
- The description.
-
getInstances
reactor.core.publisher.Flux<ServiceInstance> getInstances(String serviceId)
Gets all ServiceInstances associated with a particular serviceId.- Parameters:
serviceId- The serviceId to query.- Returns:
- A List of ServiceInstance.
-
getServices
reactor.core.publisher.Flux<String> getServices()
- Returns:
- All known service IDs.
-
probe
@Deprecated default void probe()
Deprecated.in favour ofreactiveProbe(). This method should not be used as is, as it contains a bug - the method called within returns aFlux, which is not accessible for subscription or blocking from within. We are leaving it with a deprecation in order not to bring downstream implementations.Can be used to verify the client is still valid and able to make calls.A successful invocation with no exception thrown implies the client is able to make calls.
The default implementation simply calls
getServices()- client implementations can override with a lighter weight operation if they choose to.
-
reactiveProbe
default reactor.core.publisher.Mono<Void> reactiveProbe()
Can be used to verify the client is still valid and able to make calls.A successful invocation with no exception thrown implies the client is able to make calls.
The default implementation simply calls
getServices()and wraps it with aMono- client implementations can override with a lighter weight operation if they choose to.
-
getOrder
default int getOrder()
Default implementation for getting order of discovery clients.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
- order
-
-