gpt4 book ai didi

com.qiniu.android.common.Zone.upHost()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:39:21 28 4
gpt4 key购买 nike

本文整理了Java中com.qiniu.android.common.Zone.upHost()方法的一些代码示例,展示了Zone.upHost()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone.upHost()方法的具体详情如下:
包路径:com.qiniu.android.common.Zone
类名称:Zone
方法名:upHost

Zone.upHost介绍

[英]获取上传域名
[中]获取上传域名

代码示例

代码示例来源:origin: qiniu/android-sdk

@Override
public synchronized String upHost(String token, boolean useHttps, String frozenDomain) {
  ZoneInfo info = queryByToken(token);
  if (info != null) {
    return super.upHost(info, useHttps, frozenDomain);
  } else {
    return null;
  }
}

代码示例来源:origin: com.qiniu/qiniu-android-sdk

@Override
public synchronized String upHost(String token, boolean useHttps, String frozenDomain) {
  ZoneInfo info = queryByToken(token);
  if (info != null) {
    return super.upHost(info, useHttps, frozenDomain);
  } else {
    return null;
  }
}

代码示例来源:origin: qiniu/android-sdk

public void run() {
  long offset = recoveryFromRecord();
  try {
    file = new RandomAccessFile(f, "r");
  } catch (FileNotFoundException e) {
    e.printStackTrace();
    completionHandler.complete(key, ResponseInfo.fileError(e, token), null);
    return;
  }
  nextTask(offset, 0, config.zone.upHost(token.token, config.useHttps, null));
}

代码示例来源:origin: com.qiniu/qiniu-android-sdk

public void run() {
  long offset = recoveryFromRecord();
  try {
    file = new RandomAccessFile(f, "r");
  } catch (FileNotFoundException e) {
    e.printStackTrace();
    completionHandler.complete(key, ResponseInfo.fileError(e, token), null);
    return;
  }
  nextTask(offset, 0, config.zone.upHost(token.token, config.useHttps, null));
}

代码示例来源:origin: com.qiniu/qiniu-android-sdk

String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
if (info.statusCode == 701 && retried < config.retryMax) {
  nextTask((offset / Configuration.BLOCK_SIZE) * Configuration.BLOCK_SIZE, retried + 1, upHost);
String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
nextTask(offset, retried + 1, upHostRetry);
return;
String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
nextTask(offset, retried + 1, upHostRetry);
return;

代码示例来源:origin: qiniu/android-sdk

String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
if (info.statusCode == 701 && retried < config.retryMax) {
  nextTask((offset / Configuration.BLOCK_SIZE) * Configuration.BLOCK_SIZE, retried + 1, upHost);
String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
nextTask(offset, retried + 1, upHostRetry);
return;
String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
nextTask(offset, retried + 1, upHostRetry);
return;

代码示例来源:origin: qiniu/android-sdk

args.params = params;
final String upHost = config.zone.upHost(token.token, config.useHttps, null);
Log.d("Qiniu.FormUploader", "upload use up host " + upHost);
CompletionHandler completion = new CompletionHandler() {

代码示例来源:origin: com.qiniu/qiniu-android-sdk

args.params = params;
final String upHost = config.zone.upHost(token.token, config.useHttps, null);
Log.d("Qiniu.FormUploader", "upload use up host " + upHost);
CompletionHandler completion = new CompletionHandler() {

代码示例来源:origin: qiniu/android-sdk

final String upHost = config.zone.upHost(token.token, config.useHttps, null);
Log.d("Qiniu.FormUploader", "sync upload use up host " + upHost);
ResponseInfo info = client.syncMultipartPost(upHost, args, token);
  String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
  Log.d("Qiniu.FormUploader", "sync upload retry first time use up host " + upHostRetry);
  info = client.syncMultipartPost(upHostRetry, args, token);
    String upHostRetry2 = config.zone.upHost(token.token, config.useHttps, upHostRetry);
    Log.d("Qiniu.FormUploader", "sync upload retry second time use up host " + upHostRetry2);
    info = client.syncMultipartPost(upHostRetry2, args, token);

代码示例来源:origin: com.qiniu/qiniu-android-sdk

final String upHost = config.zone.upHost(token.token, config.useHttps, null);
Log.d("Qiniu.FormUploader", "sync upload use up host " + upHost);
ResponseInfo info = client.syncMultipartPost(upHost, args, token);
  String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
  Log.d("Qiniu.FormUploader", "sync upload retry first time use up host " + upHostRetry);
  info = client.syncMultipartPost(upHostRetry, args, token);
    String upHostRetry2 = config.zone.upHost(token.token, config.useHttps, upHostRetry);
    Log.d("Qiniu.FormUploader", "sync upload retry second time use up host " + upHostRetry2);
    info = client.syncMultipartPost(upHostRetry2, args, token);

代码示例来源:origin: qiniu/android-sdk

completionHandler.complete(key, info, response);
} else if (info.needRetry()) {
  final String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
  Log.d("Qiniu.FormUploader", "retry upload first time use up host " + upHostRetry);
  CompletionHandler retried = new CompletionHandler() {

代码示例来源:origin: com.qiniu/qiniu-android-sdk

completionHandler.complete(key, info, response);
} else if (info.needRetry()) {
  final String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
  Log.d("Qiniu.FormUploader", "retry upload first time use up host " + upHostRetry);
  CompletionHandler retried = new CompletionHandler() {

代码示例来源:origin: qiniu/android-sdk

@Override
  public void complete(ResponseInfo info, JSONObject response) {
    if (info.isNetworkBroken() && !AndroidNetwork.isNetWorkReady()) {
      options.netReadyHandler.waitReady();
      if (!AndroidNetwork.isNetWorkReady()) {
        completionHandler.complete(key, info, response);
        return;
      }
    }
    if (info.isOK()) {
      removeRecord();
      options.progressHandler.progress(key, 1.0);
      completionHandler.complete(key, info, response);
      return;
    }
    // mkfile  ,允许多重试一次
    if (info.needRetry() && retried < config.retryMax + 1) {
      String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
      if (upHostRetry != null) {
        nextTask(offset, retried + 1, upHostRetry);
        return;
      }
    }
    completionHandler.complete(key, info, response);
  }
};

代码示例来源:origin: com.qiniu/qiniu-android-sdk

@Override
  public void complete(ResponseInfo info, JSONObject response) {
    if (info.isNetworkBroken() && !AndroidNetwork.isNetWorkReady()) {
      options.netReadyHandler.waitReady();
      if (!AndroidNetwork.isNetWorkReady()) {
        completionHandler.complete(key, info, response);
        return;
      }
    }
    if (info.isOK()) {
      removeRecord();
      options.progressHandler.progress(key, 1.0);
      completionHandler.complete(key, info, response);
      return;
    }
    // mkfile  ,允许多重试一次
    if (info.needRetry() && retried < config.retryMax + 1) {
      String upHostRetry = config.zone.upHost(token.token, config.useHttps, upHost);
      if (upHostRetry != null) {
        nextTask(offset, retried + 1, upHostRetry);
        return;
      }
    }
    completionHandler.complete(key, info, response);
  }
};

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com