Tabnine Logo
ServiceException.getResponseCode
Code IndexAdd Tabnine to your IDE (free)

How to use
getResponseCode
method
in
org.jets3t.service.ServiceException

Best Java code snippets using org.jets3t.service.ServiceException.getResponseCode (Showing top 10 results out of 315)

origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

if(e.getResponseCode() == 403) {
  if(log.isDebugEnabled()) {
    log.debug("Bucket named '" + bucketName + "' exists but is inaccessible, "
else if(e.getResponseCode() == 404) {
  if(log.isDebugEnabled()) {
    log.debug("Bucket does not exist: " + bucketName, e);
origin: net.java.dev.jets3t/jets3t

if(e.getResponseCode() == 403) {
  if(log.isDebugEnabled()) {
    log.debug("Bucket named '" + bucketName + "' exists but is inaccessible, "
else if(e.getResponseCode() == 404) {
  if(log.isDebugEnabled()) {
    log.debug("Bucket does not exist: " + bucketName, e);
origin: io.druid.extensions/druid-s3-extensions

public static boolean isObjectInBucket(RestS3Service s3Client, String bucketName, String objectKey)
  throws ServiceException
{
 try {
  s3Client.getObjectDetails(bucketName, objectKey);
 }
 catch (ServiceException e) {
  if (404 == e.getResponseCode()
    || "NoSuchKey".equals(e.getErrorCode())
    || "NoSuchBucket".equals(e.getErrorCode())) {
   return false;
  }
  if ("AccessDenied".equals(e.getErrorCode())) {
   // Object is inaccessible to current user, but does exist.
   return true;
  }
  // Something else has gone wrong
  throw e;
 }
 return true;
}
origin: net.java.dev.jets3t/jets3t

  getObjectDetails(bucketName, objectKey);
} catch (ServiceException e) {
  if (404 == e.getResponseCode()
    || "NoSuchKey".equals(e.getErrorCode())
    || "NoSuchBucket".equals(e.getErrorCode()))
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

  getObjectDetails(bucketName, objectKey);
} catch (ServiceException e) {
  if (404 == e.getResponseCode()
    || "NoSuchKey".equals(e.getErrorCode())
    || "NoSuchBucket".equals(e.getErrorCode()))
origin: io.druid.extensions/druid-s3-extensions

log.error(outerException, "Exception while listing on %s", uri);
if (outerException.getResponseCode() == 403) {
origin: io.druid.extensions/druid-s3-extensions

if (404 == e.getResponseCode()
  || "NoSuchKey".equals(e.getErrorCode())
  || "NoSuchBucket".equals(e.getErrorCode())) {
origin: iterate-ch/cyberduck

  this.append(buffer, e.getMessage());
switch(e.getResponseCode()) {
  case HttpStatus.SC_FORBIDDEN:
    if(StringUtils.isNotBlank(e.getErrorCode())) {
  return new InteroperabilityException(buffer.toString(), e);
return new HttpResponseExceptionMappingService().map(new HttpResponseException(e.getResponseCode(), buffer.toString()));
origin: net.java.dev.jets3t/jets3t

/**
 * Wrap a ServiceException as an S3ServiceException.
 * @param se
 */
public S3ServiceException(ServiceException se) {
  super(se.getMessage(), se.getXmlMessage(), se.getCause());
  this.setResponseHeaders(se.getResponseHeaders());
  this.setResponseCode(se.getResponseCode());
  this.setResponseStatus(se.getResponseStatus());
  this.setResponseDate(se.getResponseDate());
  this.setRequestVerb(se.getRequestVerb());
  this.setRequestPath(se.getRequestPath());
  this.setRequestHost(se.getRequestHost());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * Wrap a ServiceException as an S3ServiceException.
 * @param se
 */
public S3ServiceException(ServiceException se) {
  super(se.getMessage(), se.getXmlMessage(), se.getCause());
  this.setResponseHeaders(se.getResponseHeaders());
  this.setResponseCode(se.getResponseCode());
  this.setResponseStatus(se.getResponseStatus());
  this.setResponseDate(se.getResponseDate());
  this.setRequestVerb(se.getRequestVerb());
  this.setRequestPath(se.getRequestPath());
  this.setRequestHost(se.getRequestHost());
}
org.jets3t.serviceServiceExceptiongetResponseCode

Popular methods of ServiceException

  • getMessage
  • getCause
  • getErrorCode
  • getErrorMessage
  • <init>
    Create a service exception that includes an underlying cause exception.
  • getResponseHeaders
  • getResponseStatus
  • printStackTrace
  • setErrorCode
    Set the exception's error code; for internal use only.
  • setErrorMessage
    Set the exception's error message; for internal use only.
  • findXmlElementText
  • getRequestHost
  • findXmlElementText,
  • getRequestHost,
  • getRequestPath,
  • getRequestVerb,
  • getResponseDate,
  • getXmlMessage,
  • getXmlMessageAsBuilder,
  • isParsedFromXmlMessage,
  • parseXmlMessage

Popular in Java

  • Parsing JSON documents to java classes using gson
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now