Package org.jets3t.service.impl.rest

Examples of org.jets3t.service.impl.rest.HttpException


    if (thrown.getCause() != null) {
      // recurse down
      result = processException(thrown.getCause(), original, key);
    } else if (thrown instanceof HttpException) {
      // nested HttpException - examine error code and react
      HttpException httpException = (HttpException) thrown;
      String responseMessage = httpException.getResponseMessage();
      int responseCode = httpException.getResponseCode();
      String bucketName = "s3n://" + bucket.getName();
      String text = String.format("%s : %03d : %s",
          bucketName,
          responseCode,
          responseMessage);
View Full Code Here


                       
                        if (responseCode == 500) {
                            // Retrying after InternalError 500, don't throw exception.
                        } else {
                            // Throw exception containing the HTTP error fields.
                          HttpException httpException = new HttpException(
                              httpMethod.getStatusCode(), httpMethod.getStatusText());
                            throw new S3ServiceException("S3 " + httpMethod.getName()
                                + " request failed for '" + httpMethod.getPath() + "' - "
                                + "ResponseCode=" + httpMethod.getStatusCode()
                                + ", ResponseMessage=" + httpMethod.getStatusText()
View Full Code Here

                       
                        if (responseCode == 500 || responseCode == 503) {
                            // Retrying after InternalError 500, don't throw exception.
                        } else {
                            // Throw exception containing the HTTP error fields.
                          HttpException httpException = new HttpException(
                              httpMethod.getStatusCode(), httpMethod.getStatusText());
                            S3ServiceException exception = new S3ServiceException("S3 " + httpMethod.getName()
                                + " request failed for '" + httpMethod.getPath() + "' - "
                                + "ResponseCode=" + httpMethod.getStatusCode()
                                + ", ResponseMessage=" + httpMethod.getStatusText()
View Full Code Here

                       
                        if (responseCode == 500 || responseCode == 503) {
                            // Retrying after InternalError 500, don't throw exception.
                        } else {
                            // Throw exception containing the HTTP error fields.
                          HttpException httpException = new HttpException(
                              httpMethod.getStatusCode(), httpMethod.getStatusText());
                            S3ServiceException exception = new S3ServiceException("S3 " + httpMethod.getName()
                                + " request failed for '" + httpMethod.getPath() + "' - "
                                + "ResponseCode=" + httpMethod.getStatusCode()
                                + ", ResponseMessage=" + httpMethod.getStatusText()
View Full Code Here

                    }
                    if(responseBody != null && responseBody.length > 0) {
                        responseText = new String(responseBody);
                    }
                    // Prepare exception containing the HTTP error fields.
                    HttpException httpException = new HttpException(
                        responseCode, response.getStatusLine().getReasonPhrase());
                    exception = new ServiceException(
                        "Request Error" + (responseText != null ? " [" + responseText + "]." : "."),
                        httpException);
                }
View Full Code Here

TOP

Related Classes of org.jets3t.service.impl.rest.HttpException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.