|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.util.url.URLFetcher
Provides the main public API to the URL service through a bunch of static methods. Applications register services to define a certain set of characteristics such as cache size, thread pool size, cache timeouts. There is a default service for applications that don't have any special requirements.
Constructor Summary | |
URLFetcher()
|
Method Summary | |
static String |
fetchURL(String url,
String key)
Deprecated. use fetchURLData(String url, String key) instead |
static URLData |
fetchURLData(String url,
String key)
Fetches the URL using the service specified by the key param. |
boolean |
hasService(String key)
|
static void |
purgeURL(String url,
String key)
Purges the specified URL from the cache. |
static void |
registerService(String key,
URLPool pool,
URLCache cache)
Registers a new service the key is the unique name for the service, typically the packagename of the application using the service. |
static void |
registerService(String key,
URLPool pool,
URLCache cache,
boolean cacheFailedRetrievals)
Registers a new service the key is the unique name for the service, typically the packagename of the application using the service. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public URLFetcher()
Method Detail |
public static void registerService(String key, URLPool pool, URLCache cache)
public static void registerService(String key, URLPool pool, URLCache cache, boolean cacheFailedRetrievals)
key
- service key namepool
- URLPool to be usedcache
- URLCache to be usedcacheFailedRetrievals
- determine whether information on failed
retrievals should be cachedpublic static String fetchURL(String url, String key)
fetchURLData(String url, String key)
instead
public static URLData fetchURLData(String url, String key)
public static void purgeURL(String url, String key)
public boolean hasService(String key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |