Class StaticServiceInstanceProvider
- java.lang.Object
-
- org.springframework.cloud.client.hypermedia.StaticServiceInstanceProvider
-
- All Implemented Interfaces:
ServiceInstanceProvider
public class StaticServiceInstanceProvider extends Object implements ServiceInstanceProvider
AServiceInstanceProvider
that will always return the configuredServiceInstance
.- Author:
- Oliver Gierke
-
-
Constructor Summary
Constructors Constructor Description StaticServiceInstanceProvider(ServiceInstance instance)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceInstance
getServiceInstance()
Returns the service instance or null if the service is currently unavailable.
-
-
-
Constructor Detail
-
StaticServiceInstanceProvider
public StaticServiceInstanceProvider(ServiceInstance instance)
-
-
Method Detail
-
getServiceInstance
public ServiceInstance getServiceInstance()
Description copied from interface:ServiceInstanceProvider
Returns the service instance or null if the service is currently unavailable.- Specified by:
getServiceInstance
in interfaceServiceInstanceProvider
- Returns:
- The service instance, or null if the service is currently unavailable.
-
-