Package com.spidercache.utils

Examples of com.spidercache.utils.IntermediateHttpClient


   * Initializes the caching service.
   * @return True on success, false on failure.
   */
  public boolean cacheServiceStart(){
    cache = new Cache((long)2<<35, cachepath);
    IntermediateHttpClient HTTPClient = new IntermediateHttpClient();
    CacheCon  = new ThreadSafeClientConnManager();
    config = new CacheConfig();
    config.setSharedCache(true);
    config.setMaxObjectSizeBytes(2<<31);
    CacheClient = new CachingHttpClient(HTTPClient, cache, config);
View Full Code Here


  public static void main(String[] args) throws Exception {
        // Create an HttpClient with the ThreadSafeClientConnManager.
        // This connection manager must be used if more than one thread will
        // be using the HttpClient.
   
    IntermediateHttpClient interClient = new IntermediateHttpClient();
    ((ThreadSafeClientConnManager)interClient.getConnectionManager()).setMaxTotal(100);
        CacheConfig config = new CacheConfig();
        config.setMaxObjectSizeBytes(2<<24);
        CachingHttpClient httpclient = new CachingHttpClient(new IntermediateHttpClient(), new Cache((long)2<<34, "places"), config);

        try {
            // create an array of URIs to perform GETs on
            String[] urisToGet = {
                "http://www.gutenberg.org/files/76/76-h/76-h/76-h.htm",
View Full Code Here

TOP

Related Classes of com.spidercache.utils.IntermediateHttpClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.