T - for backward compatibilitypublic interface LookupService<T>
| Modifier and Type | Method and Description |
|---|---|
Application |
getApplication(java.lang.String appName)
Returns the corresponding
Application object which is basically a
container of all registered appName InstanceInfos. |
Applications |
getApplications()
Returns the
Applications object which is basically a container of
all currently registered Applications. |
java.util.List<InstanceInfo> |
getInstancesById(java.lang.String id)
Returns the
List of InstanceInfos matching the the passed
in id. |
InstanceInfo |
getNextServerFromEureka(java.lang.String virtualHostname,
boolean secure)
Gets the next possible server to process the requests from the registry
information received from eureka.
|
Application getApplication(java.lang.String appName)
Application object which is basically a
container of all registered appName InstanceInfos.appName - Application or null if we couldn't locate any app of
the requested appNameApplications getApplications()
Applications object which is basically a container of
all currently registered Applications.Applicationsjava.util.List<InstanceInfo> getInstancesById(java.lang.String id)
List of InstanceInfos matching the the passed
in id. A single InstanceInfo can possibly be registered w/ more
than one Applicationsid - List of InstanceInfos or
Collections.emptyList()InstanceInfo getNextServerFromEureka(java.lang.String virtualHostname, boolean secure)
The next server is picked on a round-robin fashion. By default, this
method just returns the servers that are currently with
InstanceInfo.InstanceStatus.UP status.
This configuration can be controlled by overriding the
EurekaClientConfig.shouldFilterOnlyUpInstances().
Note that in some cases (Eureka emergency mode situation), the instances
that are returned may not be unreachable, it is solely up to the client
at that point to timeout quickly and retry the next server.
virtualHostname - the virtual host name that is associated to the servers.secure - indicates whether this is a HTTP or a HTTPS request - secure
means HTTPS.InstanceInfo information which contains the public
host name of the next server in line to process the request based
on the round-robin algorithm.java.lang.RuntimeException - if the virtualHostname does not exist