Package freenet.client

Examples of freenet.client.FetchContext


   
    if(mMessages.add(uri) == false)// The message is already being fetched.
      return;

    try {
      FetchContext fetchContext = mClient.getFetchContext();
      // We MUST use a finite amount of retries because this function is specified to do so and the callers rely on that.
      fetchContext.maxSplitfileBlockRetries = 2;
      fetchContext.maxNonSplitfileRetries = 2;
      fetchContext.maxOutputLength = WoTMessageXML.MAX_XML_SIZE; // TODO: fetch() also takes a maxSize parameter, why?
      ClientGetter g = mClient.fetch(uri, WoTMessageXML.MAX_XML_SIZE, requestClient, this, fetchContext, RequestStarter.IMMEDIATE_SPLITFILE_PRIORITY_CLASS);
View Full Code Here


 
  /**
   * Fetches the given USK and returns the new USKRetriever. Does not check whether there is already a fetch for that USK.
   */
  private USKRetriever fetch(USK usk) throws MalformedURLException {
    FetchContext fetchContext = mClient.getFetchContext();
    fetchContext.maxSplitfileBlockRetries = -1; // retry forever
    fetchContext.maxNonSplitfileRetries = -1; // retry forever
    fetchContext.maxOutputLength = WoTMessageListXML.MAX_XML_SIZE;
    if(logDEBUG) Logger.debug(this, "Subscribing to WoTMessageList queue " + usk);
    return mUSKManager.subscribeContent(usk, this, true, fetchContext, RequestStarter.UPDATE_PRIORITY_CLASS, mRequestClient);
View Full Code Here

     
      mIdentities.push(identity.getID()); // put this identity at the beginning of the LRUQueue
    }
   
    FreenetURI uri = WoTMessageList.generateURI(identity, index).sskForUSK(); // We must use a SSK to disallow redirects.
    FetchContext fetchContext = mClient.getFetchContext();
    fetchContext.maxSplitfileBlockRetries = 2; /* 3 and above or -1 = cooldown queue. -1 is infinite */
    fetchContext.maxNonSplitfileRetries = 2;
    fetchContext.maxOutputLength = WoTMessageListXML.MAX_XML_SIZE; // TODO: fetch() also takes a maxSize parameter, why?
    ClientGetter g = mClient.fetch(uri, WoTMessageListXML.MAX_XML_SIZE, mRequestClient, this, fetchContext, RequestStarter.IMMEDIATE_SPLITFILE_PRIORITY_CLASS);
    addFetch(g);
View Full Code Here

TOP

Related Classes of freenet.client.FetchContext

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.