static void notifyEvent(String lastFetchedRound, String shortName) {
System.out.printf("Notify round \"%s\", event \"%s\"%n", lastFetchedRound, shortName);
if (!isRecordingRequired()) {
return;
}
try {
HttpResponse<String> stringHttpResponse = Unirest.post(RECORDING_SYSTEM_ENDPOINT + "/notify")
.body(lastFetchedRound+"/"+shortName)
.asString();
if (stringHttpResponse.getStatus() != 200) {
System.err.println("Recording system returned code: "+stringHttpResponse.getStatus());
return;
}
if (!stringHttpResponse.getBody().startsWith("ACK")) {
System.err.println("Recording system returned body: "+stringHttpResponse.getStatus());
}
} catch (UnirestException e) {
System.err.println("Could not reach recording system: " + e.getMessage());
}
}
RecordingSystem.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:tdl-runner-scala
作者:
评论列表
文章目录