Package freenet.client.FetchException

Examples of freenet.client.FetchException.FetchExceptionMode


  @Override
  public void onFailure(FetchException e, ClientGetter state) {
    logMINOR = Logger.shouldLog(LogLevel.MINOR, this);
    if(!isRunning)
      return;
    FetchExceptionMode errorCode = e.getMode();
    tempBlobFile.delete();

    if(logMINOR)
      Logger.minor(this, "onFailure(" + e + ',' + state + ')');
    synchronized(this) {
View Full Code Here


    }
    if(statusCache != null) {
      if(get instanceof ClientGet) {
        ClientGet download = (ClientGet)get;
        GetFailedMessage msg = download.getFailureMessage();
        FetchExceptionMode failureCode = null;
        String shortFailMessage = null;
        String longFailMessage = null;
        if(msg != null) {
          failureCode = msg.code;
          shortFailMessage = msg.getShortFailedMessage();
View Full Code Here

      fetched = (int) progressPending.getFetchedBlocks();
      fatal = (int) progressPending.getFatalyFailedBlocks();
      failed = (int) progressPending.getFailedBlocks();
    }
    if(finished && succeeded) totalFinalized = true;
    FetchExceptionMode failureCode = null;
    String failureReasonShort = null;
    String failureReasonLong = null;
    if(getFailedMessage != null) {
      failureCode = getFailedMessage.code;
      failureReasonShort = getFailedMessage.getShortFailedMessage();
View Full Code Here

  }
 
  void onFailure(FetchException e, ClientGetter state, Bucket blob) {
    logMINOR = Logger.shouldLog(LogLevel.MINOR, this);
    if(logMINOR) Logger.minor(this, "Revocation fetch failed: "+e);
    FetchExceptionMode errorCode = e.getMode();
    boolean completed = false;
    long now = System.currentTimeMillis();
    if(errorCode == FetchExceptionMode.CANCELLED) {
      return; // cancelled by us above, or killed; either way irrelevant and doesn't need to be restarted
    }
View Full Code Here

          if(download.toTempSpace())
            completedDownloadToTemp.add(download);
          else // to disk
            completedDownloadToDisk.add(download);
        } else if(download.hasFinished()) {
            FetchExceptionMode failureCode = download.getFailureCode();
          String mimeType = download.getMIMEType();
          if(mimeType == null && (failureCode == FetchExceptionMode.CONTENT_VALIDATION_UNKNOWN_MIME || failureCode == FetchExceptionMode.CONTENT_VALIDATION_BAD_MIME)) {
            Logger.error(this, "MIME type is null but failure code is "+FetchException.getMessage(failureCode)+" for "+download.getIdentifier()+" : "+download.getURI());
            mimeType = DefaultMIMETypes.DEFAULT_MIME_TYPE;
          }
View Full Code Here

TOP

Related Classes of freenet.client.FetchException.FetchExceptionMode

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.