public interface EurekaClient extends LookupService
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<java.lang.String> |
getAllKnownRegions() |
Applications |
getApplications(java.lang.String serviceUrl)
Get all applications registered with a specific eureka service.
|
Applications |
getApplicationsForARegion(java.lang.String region) |
java.util.List<java.lang.String> |
getDiscoveryServiceUrls(java.lang.String zone)
Get the list of all eureka service urls for the eureka client to talk to.
|
HealthCheckHandler |
getHealthCheckHandler() |
InstanceInfo.InstanceStatus |
getInstanceRemoteStatus() |
java.util.List<InstanceInfo> |
getInstancesByVipAddress(java.lang.String vipAddress,
boolean secure)
Gets the list of instances matching the given VIP Address.
|
java.util.List<InstanceInfo> |
getInstancesByVipAddress(java.lang.String vipAddress,
boolean secure,
java.lang.String region)
Gets the list of instances matching the given VIP Address in the passed region.
|
java.util.List<InstanceInfo> |
getInstancesByVipAddressAndAppName(java.lang.String vipAddress,
java.lang.String appName,
boolean secure)
Gets the list of instances matching the given VIP Address and the given
application name if both of them are not null.
|
java.util.List<java.lang.String> |
getServiceUrlsFromConfig(java.lang.String instanceZone,
boolean preferSameZone)
Get the list of all eureka service urls from properties file for the eureka client to talk to.
|
java.util.List<java.lang.String> |
getServiceUrlsFromDNS(java.lang.String instanceZone,
boolean preferSameZone)
Get the list of all eureka service urls from DNS for the eureka client to
talk to.
|
void |
registerHealthCheck(HealthCheckHandler healthCheckHandler)
Register
HealthCheckHandler with the eureka client. |
void |
registerHealthCheckCallback(HealthCheckCallback callback)
Deprecated.
Use
registerHealthCheck(com.netflix.appinfo.HealthCheckHandler) instead.
Register HealthCheckCallback with the eureka client.
Once registered, the eureka client will invoke the
HealthCheckCallback in intervals specified by
EurekaClientConfig.getInstanceInfoReplicationIntervalSeconds(). |
void |
shutdown()
Shuts down Eureka Client.
|
getApplication, getApplications, getInstancesById, getNextServerFromEurekaApplications getApplicationsForARegion(@Nullable java.lang.String region)
region - the region that the Applications reside inApplications for the matching region. a Null value
is treated as the local region.Applications getApplications(java.lang.String serviceUrl)
serviceUrl - The string representation of the service url.java.util.List<InstanceInfo> getInstancesByVipAddress(java.lang.String vipAddress, boolean secure)
vipAddress - The VIP address to match the instances for.secure - true if it is a secure vip address, false otherwiseInstanceInfo objects matching the criteriajava.util.List<InstanceInfo> getInstancesByVipAddress(java.lang.String vipAddress, boolean secure, @Nullable java.lang.String region)
vipAddress - The VIP address to match the instances for.secure - true if it is a secure vip address, false otherwiseregion - region from which the instances are to be fetched. If null then local region is
assumed.InstanceInfo objects matching the criteria, empty list if not instances found.java.util.List<InstanceInfo> getInstancesByVipAddressAndAppName(java.lang.String vipAddress, java.lang.String appName, boolean secure)
vipAddress - The VIP address to match the instances for.appName - The applicationName to match the instances for.secure - true if it is a secure vip address, false otherwise.InstanceInfo objects matching the criteria.java.util.Set<java.lang.String> getAllKnownRegions()
InstanceInfo.InstanceStatus getInstanceRemoteStatus()
java.util.List<java.lang.String> getDiscoveryServiceUrls(java.lang.String zone)
zone - the zone in which the client residesjava.util.List<java.lang.String> getServiceUrlsFromConfig(java.lang.String instanceZone,
boolean preferSameZone)
instanceZone - The zone in which the client residespreferSameZone - true if we have to prefer the same zone as the client, false otherwisejava.util.List<java.lang.String> getServiceUrlsFromDNS(java.lang.String instanceZone,
boolean preferSameZone)
instanceZone - The zone in which the client resides.preferSameZone - true if we have to prefer the same zone as the client, false otherwise.@Deprecated void registerHealthCheckCallback(HealthCheckCallback callback)
registerHealthCheck(com.netflix.appinfo.HealthCheckHandler) instead.
Register HealthCheckCallback with the eureka client.
Once registered, the eureka client will invoke the
HealthCheckCallback in intervals specified by
EurekaClientConfig.getInstanceInfoReplicationIntervalSeconds().callback - app specific healthcheck.void registerHealthCheck(HealthCheckHandler healthCheckHandler)
HealthCheckHandler with the eureka client.
Once registered, the eureka client will invoke the
HealthCheckHandler in intervals specified by
EurekaClientConfig.getInstanceInfoReplicationIntervalSeconds().healthCheckHandler - app specific healthcheck handler.HealthCheckHandler getHealthCheckHandler()
void shutdown()