Class EurekaRegistryClient
- java.lang.Object
-
- org.kiwiproject.registry.eureka.client.EurekaRegistryClient
-
- All Implemented Interfaces:
RegistryClient
public class EurekaRegistryClient extends Object implements RegistryClient
RegistryClientimplementation for looking up services from Eureka registry server.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.kiwiproject.registry.client.RegistryClient
RegistryClient.InstanceQuery
-
-
Constructor Summary
Constructors Constructor Description EurekaRegistryClient(EurekaConfig config, EurekaRestClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<ServiceInstance>findAllServiceInstancesBy(RegistryClient.InstanceQuery query)Attempts to find all service instances from the givenRegistryClient.InstanceQuery.Optional<ServiceInstance>findServiceInstanceBy(String serviceName, String instanceId)Attempts to find a service instance with the given service name and the given instance id.List<ServiceInstance>retrieveAllRegisteredInstances()Retrieves all registered service instances from the registry.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.kiwiproject.registry.client.RegistryClient
findAllServiceInstancesBy, findServiceInstanceBy, findServiceInstanceBy
-
-
-
-
Constructor Detail
-
EurekaRegistryClient
public EurekaRegistryClient(EurekaConfig config, EurekaRestClient client)
-
-
Method Detail
-
findServiceInstanceBy
public Optional<ServiceInstance> findServiceInstanceBy(String serviceName, String instanceId)
Description copied from interface:RegistryClientAttempts to find a service instance with the given service name and the given instance id.- Specified by:
findServiceInstanceByin interfaceRegistryClient- Parameters:
serviceName- The name of the service that is being requestedinstanceId- The id of the instance that is wanted- Returns:
- an
Optionalcontaining the found service orOptional.empty()
-
findAllServiceInstancesBy
public List<ServiceInstance> findAllServiceInstancesBy(RegistryClient.InstanceQuery query)
Description copied from interface:RegistryClientAttempts to find all service instances from the givenRegistryClient.InstanceQuery.- Specified by:
findAllServiceInstancesByin interfaceRegistryClient- Parameters:
query- aRegistryClient.InstanceQuerycontaining the search parameters to find the instance- Returns:
- a
Listcontaining the found services
-
retrieveAllRegisteredInstances
public List<ServiceInstance> retrieveAllRegisteredInstances()
Description copied from interface:RegistryClientRetrieves all registered service instances from the registry.- Specified by:
retrieveAllRegisteredInstancesin interfaceRegistryClient- Returns:
- a
Listcontaining all registered service instances
-
-