org.archive.wayback.liveweb
Class RemoteLiveWebCache

java.lang.Object
  extended by org.archive.wayback.liveweb.RemoteLiveWebCache
All Implemented Interfaces:
LiveWebCache

public class RemoteLiveWebCache
extends Object
implements LiveWebCache

Author:
brad

Constructor Summary
RemoteLiveWebCache()
           
 
Method Summary
 Resource getCachedResource(URL url, long maxCacheMS, boolean bUseOlder)
          Fetch a Resource from the live web, or from a cache of the live web.
 void setMaxHostConnections(int maxHostConnections)
           
 void setMaxTotalConnections(int maxTotalConnections)
           
 void setProxyHostPort(String hostPort)
           
 void shutdown()
          closes all resources
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteLiveWebCache

public RemoteLiveWebCache()
Method Detail

getCachedResource

public Resource getCachedResource(URL url,
                                  long maxCacheMS,
                                  boolean bUseOlder)
                           throws LiveDocumentNotAvailableException,
                                  LiveWebCacheUnavailableException,
                                  IOException
Description copied from interface: LiveWebCache
Fetch a Resource from the live web, or from a cache of the live web.

Specified by:
getCachedResource in interface LiveWebCache
Parameters:
url - to fetch from the live web.
maxCacheMS - maximum age of resource to return - optionally honored
bUseOlder - if true, return documents older than maxCacheMS if a more recent copy is not available.
Returns:
Resource for url
Throws:
LiveDocumentNotAvailableException - if the resource cannot be retrieved from the live web, but all proxying and caching mechanisms functioned properly
LiveWebCacheUnavailableException - if there was a problem either accessing the live web, in proxying to the live web, or in maintaining the cache for the live web
IOException - for the usual reasons

shutdown

public void shutdown()
Description copied from interface: LiveWebCache
closes all resources

Specified by:
shutdown in interface LiveWebCache

setProxyHostPort

public void setProxyHostPort(String hostPort)
Parameters:
hostPort - to proxy requests through - ex. "localhost:3128"

setMaxTotalConnections

public void setMaxTotalConnections(int maxTotalConnections)
Parameters:
maxTotalConnections - the HttpConnectionManagerParams config

setMaxHostConnections

public void setMaxHostConnections(int maxHostConnections)
Parameters:
maxHostConnections - the HttpConnectionManagerParams config


Copyright © 2005-2011 Internet Archive. All Rights Reserved.