RestRequest request = requestBuilder.build();
Future<RestResponse> future = client.restRequest(request);
// This will block
RestResponse response = future.get();
final ByteString entity = response.getEntity();
if(entity == null) {
if(logger.isDebugEnabled()) {
logger.debug("Empty response !");
}
responseMessage = "Received empty response from " + coordinatorUrl;
} else {
responseMessage = entity.asString("UTF-8");
success = true;
}
} catch(Exception e) {
if(e.getCause() instanceof RestException) {
responseMessage = ((RestException) e.getCause()).getResponse()