public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
public String getStatusLine() { return String.format("HTTP/1.1 %d %s", getStatusCode(), getMessage()); }
private void waitOperationDone(Operation operation) { AtomicReference<Operation> operationRef = Atomics.newReference(operation); // wait for the operation to complete if (!retryOperationDonePredicate.apply(operationRef)) { throw new UncheckedTimeoutException("operation did not reach DONE state" + operationRef.get()); } // check if the operation failed if (operationRef.get().getHttpError().isPresent()) { HttpResponse response = operationRef.get().getHttpError().get(); throw new IllegalStateException("operation failed. Http Error Code: " + response.getStatusCode() + " HttpError: " + response.getMessage()); } }
private void waitOperationDone(Operation operation) { AtomicReference<Operation> operationRef = Atomics.newReference(operation); // wait for the operation to complete if (!retryOperationDonePredicate.apply(operationRef)) { throw new UncheckedTimeoutException("operation did not reach DONE state" + operationRef.get()); } // check if the operation failed if (operationRef.get().getHttpError().isPresent()) { HttpResponse response = operationRef.get().getHttpError().get(); throw new IllegalStateException("operation failed. Http Error Code: " + response.getStatusCode() + " HttpError: " + response.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
public T fromHttpResponse(HttpResponse in) { return super.fromHttpMessage(in) .statusCode(in.getStatusCode()) .message(in.getMessage()); } }
protected String waitForJobCompletion(HttpResponse response) throws InterruptedException, IOException { String fullMessage = response.getMessage()+"; "+response.getStatusLine(); return waitForJobCompletion(response.getStatusCode(), response.getPayload().openStream(), fullMessage); }
HttpResponse response = operation.get().getHttpError().get(); logger.warn("delete orphaned firewall %s failed. Http Error Code: %d HttpError: %s", operation.get().getTargetId(), response.getStatusCode(), response.getMessage()); HttpResponse response = operation.get().getHttpError().get(); logger.warn("delete orphaned network failed. Http Error Code: " + response.getStatusCode() + " HttpError: " + response.getMessage());
HttpResponse response = operation.get().getHttpError().get(); logger.warn("delete orphaned firewall %s failed. Http Error Code: %d HttpError: %s", operation.get().getTargetId(), response.getStatusCode(), response.getMessage()); HttpResponse response = operation.get().getHttpError().get(); logger.warn("delete orphaned network failed. Http Error Code: " + response.getStatusCode() + " HttpError: " + response.getMessage());
public Builder fromOperation(Operation in) { return super.fromResource(in) .targetLink(in.getTargetLink()) .targetId(in.getTargetId().orNull()) .clientOperationId(in.getClientOperationId().orNull()) .status(in.getStatus()) .statusMessage(in.getStatusMessage().orNull()) .user(in.getUser()) .progress(in.getProgress().get()) .insertTime(in.getInsertTime()) .startTime(in.getStartTime().orNull()) .endTime(in.getEndTime().orNull()) .httpErrorStatusCode(in.getHttpError().isPresent() ? in.getHttpError().get().getStatusCode() : null) .httpErrorMessage(in.getHttpError().isPresent() ? in.getHttpError().get().getMessage() : null) .operationType(in.getOperationType()).errors(in.getErrors()) .zone(in.getZone().orNull()).region(in.getRegion().orNull()); } }
public Builder fromOperation(Operation in) { return super.fromResource(in) .targetLink(in.getTargetLink()) .targetId(in.getTargetId().orNull()) .clientOperationId(in.getClientOperationId().orNull()) .status(in.getStatus()) .statusMessage(in.getStatusMessage().orNull()) .user(in.getUser()) .progress(in.getProgress().get()) .insertTime(in.getInsertTime()) .startTime(in.getStartTime().orNull()) .endTime(in.getEndTime().orNull()) .httpErrorStatusCode(in.getHttpError().isPresent() ? in.getHttpError().get().getStatusCode() : null) .httpErrorMessage(in.getHttpError().isPresent() ? in.getHttpError().get().getMessage() : null) .operationType(in.getOperationType()).errors(in.getErrors()) .zone(in.getZone().orNull()).region(in.getRegion().orNull()); } }
exception = new HttpResponseException(response.getMessage(), command, response); break;