com.github.robozonky.integrations.zonkoid.ZonkoidConfirmationProvider.requestConfirmation()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(84)

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

ZonkoidConfirmationProvider.requestConfirmation介绍

暂无

代码示例

代码示例来源:origin: com.github.robozonky/robozonky-integration-zonkoid

@Override
public boolean requestConfirmation(final RequestId requestId, final int loanId, final int amount) {
  return requestConfirmation(requestId, loanId, amount, rootUrl, PROTOCOL_MAIN);
}

代码示例来源:origin: RoboZonky/robozonky

@Override
public boolean requestConfirmation(final RequestId requestId, final int loanId, final int amount) {
  return requestConfirmation(requestId, loanId, amount, rootUrl, PROTOCOL_MAIN);
}

代码示例来源:origin: com.github.robozonky/robozonky-integration-zonkoid

static boolean handleError(final RequestId requestId, final int loanId, final int amount, final String domain,
              final String protocol, final Throwable t) {
  switch (protocol) {
    case PROTOCOL_MAIN:
      LOGGER.warn("HTTPS communication with Zonkoid failed, trying HTTP.");
      return requestConfirmation(requestId, loanId, amount, domain, PROTOCOL_FALLBACK);
    case PROTOCOL_FALLBACK:
      LOGGER.info("Communication with Zonkoid failed.", t);
      return false;
    default:
      throw new IllegalStateException("Can not happen.");
  }
}

代码示例来源:origin: RoboZonky/robozonky

static boolean handleError(final RequestId requestId, final int loanId, final int amount, final String domain,
              final String protocol, final Throwable t) {
  switch (protocol) {
    case PROTOCOL_MAIN:
      LOGGER.warn("HTTPS communication with Zonkoid failed, trying HTTP.");
      return requestConfirmation(requestId, loanId, amount, domain, PROTOCOL_FALLBACK);
    case PROTOCOL_FALLBACK:
      LOGGER.info("Communication with Zonkoid failed.", t);
      return false;
    default:
      throw new IllegalStateException("Can not happen.");
  }
}

代码示例来源:origin: RoboZonky/robozonky

private boolean execute(final int code) {
  this.mockServerResponse(code);
  final RequestId id = new RequestId("user@somewhere.cz", "apitest".toCharArray());
  final ZonkoidConfirmationProvider zcp = new ZonkoidConfirmationProvider(serverUrl);
  final boolean result = zcp.requestConfirmation(id , 1, 200);
  this.verifyClientRequest();
  return result;
}

相关文章