public class DefaultLastfmWebServices extends AbstractLastfmWebServices
logger| Constructor and Description |
|---|
DefaultLastfmWebServices(String key,
String secret)
Set up the WebServices with the required components.
|
DefaultLastfmWebServices(String key,
String secret,
Cache cache)
Set up the WebServices with the required components.
|
DefaultLastfmWebServices(String key,
String secret,
Cache cache,
Fetcher fetcher) |
| Modifier and Type | Method and Description |
|---|---|
protected Serializable |
getFromCache(Map<String,String> parameters)
Try to fetch the result from cache.
|
protected Serializable |
putToCache(Map<String,String> parameters,
Serializable result,
long timeToLive)
Store result in cache.
|
execute, fetch, fetch, getApiKey, getApiSecret, getFetcher, setFetcher, setTimeToLivepublic DefaultLastfmWebServices(String key, String secret) throws ParserConfigurationException
key - The last.fm API key, see http://www.last.fm/api/accountsecret - The last.fm API secret, see http://www.last.fm/api/accountParserConfigurationExceptionpublic DefaultLastfmWebServices(String key, String secret, Cache cache) throws ParserConfigurationException
key - The last.fm API key, see http://www.last.fm/api/accountsecret - The last.fm API secret, see http://www.last.fm/api/accountcache - The cache implementationParserConfigurationExceptionprotected Serializable getFromCache(Map<String,String> parameters)
getFromCache in class AbstractLastfmWebServicesid - Id to lookup.protected Serializable putToCache(Map<String,String> parameters, Serializable result, long timeToLive)
putToCache in class AbstractLastfmWebServicesid - The id to store the entry for.result - The query result.timeToLive - The time to live for the cache entry.Copyright © 2012. All Rights Reserved.