|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gcube.common.clients.DiscoveryClient<S,E>
S - the type of the servicesE - the type of the service endpointspublic class DiscoveryClient<S,E>
A Client that discovers the services with which it interacts.
Discovery clients relies on a Query to discover services.
They then interact with all the services they discover until they succeed with one.
Finally, they cache the endpoint of this service and use it first for subsequent interactions.
Note that discovery clients abandon their best-effort strategy when Calls or individual
failures are marked with Unrecoverable.
Query,
Unrecoverable| Constructor Summary | |
|---|---|
DiscoveryClient(ServiceProvider<S,E> provider,
Query<E> query,
EndpointCache<E> cache)
Creates an instance with a ServiceProvider, a Query, and an EndpointCache. |
|
| Method Summary | ||
|---|---|---|
|
make(Call<S,CR> call)
Makes a Call to the service. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiscoveryClient(ServiceProvider<S,E> provider,
Query<E> query,
EndpointCache<E> cache)
ServiceProvider, a Query, and an EndpointCache.
provider - the providerquery - the querycache - the cache| Method Detail |
|---|
public <CR> CR make(Call<S,CR> call)
throws Exception
ClientCall to the service.
make in interface Client<S>CR - the type of the value returned from the callcall - the call
Exception - if the call fails
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||