public class CachingDiscoveryProvider extends java.lang.Object implements DiscoveryProvider
DiscoveryProvider that caches results and delegates computation to another provider.| Constructor and Description |
|---|
CachingDiscoveryProvider(DiscoveryProvider delegate) |
CachingDiscoveryProvider(DiscoveryProvider delegate,
long cacheExpiry,
java.util.concurrent.TimeUnit cacheExpiryUnit) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.services.discovery.model.DirectoryList |
getDirectory(java.lang.String root)
Gets a list of REST discovery documents hosted by the current server.
|
com.google.api.services.discovery.model.RestDescription |
getRestDocument(java.lang.String root,
java.lang.String name,
java.lang.String version)
Gets a REST discovery document for an API.
|
com.google.api.services.discovery.model.RpcDescription |
getRpcDocument(java.lang.String root,
java.lang.String name,
java.lang.String version)
Gets an RPC discovery document for an API.
|
public CachingDiscoveryProvider(DiscoveryProvider delegate)
public CachingDiscoveryProvider(DiscoveryProvider delegate, long cacheExpiry, java.util.concurrent.TimeUnit cacheExpiryUnit)
public com.google.api.services.discovery.model.RestDescription getRestDocument(java.lang.String root,
java.lang.String name,
java.lang.String version)
throws NotFoundException,
InternalServerErrorException
DiscoveryProvidergetRestDocument in interface DiscoveryProviderNotFoundException - if the API doesn't existInternalServerErrorException - an error takes place when getting the documentpublic com.google.api.services.discovery.model.RpcDescription getRpcDocument(java.lang.String root,
java.lang.String name,
java.lang.String version)
throws NotFoundException,
InternalServerErrorException
DiscoveryProvidergetRpcDocument in interface DiscoveryProviderNotFoundException - if the API doesn't existInternalServerErrorException - an error takes place when getting the documentpublic com.google.api.services.discovery.model.DirectoryList getDirectory(java.lang.String root)
throws InternalServerErrorException
DiscoveryProvidergetDirectory in interface DiscoveryProviderInternalServerErrorException