public class DefaultRpcServiceLookup extends Object implements RpcServiceLookup
| Constructor and Description |
|---|
DefaultRpcServiceLookup(DefaultServiceFetcher fetcher,
Long duration) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.collect.Multimap<String,String> |
getServicesFor(String container,
String host)
This result map is a map of the form
{ endpoint1 -> [services]}, endpoint2 -> [services]}
Services are described using the names expected as a result of JSON-RPC call
to system.listMethods
When a gadget is rendered the container data is mapped into gadgets.config and used to
initialize osapi, which typically results in output that looks like
{ "osapi.services" : { "http://...
|
@Inject public DefaultRpcServiceLookup(DefaultServiceFetcher fetcher, Long duration)
fetcher - RpcServiceFetcher to retrieve services available from endpointsduration - in seconds service definitions should remain in the cachepublic com.google.common.collect.Multimap<String,String> getServicesFor(String container, String host)
RpcServiceLookupgetServicesFor in interface RpcServiceLookupcontainer - Syndicator param identifying the container for whom we want serviceshost - Host for which gadget is being rendered, used to do substitution in endpointsCopyright © 2007-2012. All Rights Reserved.