Beispiel #1
0
  @Override
  public void error(int id, int errorCode, String errorMsg) {
    System.out.println(
        "ERROR by API for ID " + id + " with error code " + errorCode + " and message " + errorMsg);

    if (errorMsg.contains("pacing violation")) {
      OpenRequest or = open_request_map.remove(id);

      System.out.println("received");
      if (or.long_short_volatility == 0) {
        data_set.release_lt_sem(or.company);
      } else if (or.long_short_volatility == 1) {
        data_set.release_st_sem(or.company);
      } else {
        // TODO probably going to have to handle this differently.
      }
    }

    // TODO

  }