congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AtmosError
Code IndexAdd Tabnine to your IDE (free)

How to use
AtmosError
in
org.jclouds.atmos.domain

Best Java code snippets using org.jclouds.atmos.domain.AtmosError (Showing top 20 results out of 315)

origin: jclouds/legacy-jclouds

public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content)
    throws HttpException {
 AtmosError error = factory.create(errorHandlerProvider.get()).parse(content);
 if (error.getCode() == 1032) {
   error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
 }
 return error;
}
origin: jclouds/legacy-jclouds

public AtmosError getResult() {
 return new AtmosError(code, message);
}
origin: jclouds/legacy-jclouds

public AtmosResponseException(HttpCommand command, HttpResponse response,
    AtmosError error) {
 super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest()
      .getRequestLine(), response.getStatusCode(), error.toString()), command, response);
 this.setError(error);
}
origin: jclouds/legacy-jclouds

if (error != null && error.getCode() == 1016) {
 File file = new File(command.getCurrentRequest().getEndpoint().getPath());
 exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
 case 404:
   if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
    String message = error != null ? error.getMessage() : String.format("%s -> %s", command.getCurrentRequest()
       .getRequestLine(), response.getStatusLine());
    String path = command.getCurrentRequest().getEndpoint().getPath();
origin: com.amysta.jclouds.api/atmos

  @Override
  public Boolean createOrPropagate(Throwable t) throws Exception {
   if (HttpUtils.contains404(t)) {
     return true;
   }
   AtmosResponseException exception = getFirstThrowableOfType(t, AtmosResponseException.class);
   if (exception != null && exception.getError().getCode() == AtmosErrorCode.DIRECTORY_NOT_EMPTY.getCode()) {
     return false;
   }
   throw propagate(t);
  }
}
origin: org.jclouds.api/atmos

if (error != null && error.getCode() == 1016) {
 File file = new File(command.getCurrentRequest().getEndpoint().getPath());
 exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
 case 404:
   if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
    String message = error != null ? error.getMessage() : String.format("%s -> %s", command.getCurrentRequest()
       .getRequestLine(), response.getStatusLine());
    String path = command.getCurrentRequest().getEndpoint().getPath();
origin: org.apache.jclouds.api/atmos

  @Override
  public Boolean createOrPropagate(Throwable t) throws Exception {
   if (HttpUtils.contains404(t)) {
     return true;
   }
   AtmosResponseException exception = getFirstThrowableOfType(t, AtmosResponseException.class);
   if (exception != null && exception.getError().getCode() == AtmosErrorCode.DIRECTORY_NOT_EMPTY.getCode()) {
     return false;
   }
   throw propagate(t);
  }
}
origin: io.cloudsoft.jclouds.api/atmos

public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content)
    throws HttpException {
 AtmosError error = factory.create(errorHandlerProvider.get()).parse(content);
 if (error.getCode() == 1032) {
   error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
 }
 return error;
}
origin: io.cloudsoft.jclouds.api/atmos

if (error != null && error.getCode() == 1016) {
 File file = new File(command.getCurrentRequest().getEndpoint().getPath());
 exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
 case 404:
   if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
    String message = error != null ? error.getMessage() : String.format("%s -> %s", command.getCurrentRequest()
       .getRequestLine(), response.getStatusLine());
    String path = command.getCurrentRequest().getEndpoint().getPath();
origin: Nextdoor/bender

  @Override
  public Boolean createOrPropagate(Throwable t) throws Exception {
   if (HttpUtils.contains404(t)) {
     return true;
   }
   AtmosResponseException exception = getFirstThrowableOfType(t, AtmosResponseException.class);
   if (exception != null && exception.getError().getCode() == AtmosErrorCode.DIRECTORY_NOT_EMPTY.getCode()) {
     return false;
   }
   throw propagate(t);
  }
}
origin: org.jclouds.api/atmos

public AtmosResponseException(HttpCommand command, HttpResponse response,
    AtmosError error) {
 super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest()
      .getRequestLine(), response.getStatusCode(), error.toString()), command, response);
 this.setError(error);
}
origin: Nextdoor/bender

public AtmosError getResult() {
 return new AtmosError(code, message);
}
origin: org.jclouds.api/atmos

public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content)
    throws HttpException {
 AtmosError error = factory.create(errorHandlerProvider.get()).parse(content);
 if (error.getCode() == 1032) {
   error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
 }
 return error;
}
origin: com.amysta.jclouds.api/atmos

if (error != null && error.getCode() == AtmosErrorCode.RESOURCE_ALREADY_EXISTS.getCode()) {
 File file = new File(command.getCurrentRequest().getEndpoint().getPath());
 exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
 case 404:
   if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
    String message = error != null ? error.getMessage() : String.format("%s -> %s", command.getCurrentRequest()
       .getRequestLine(), response.getStatusLine());
    String path = command.getCurrentRequest().getEndpoint().getPath();
origin: apache/jclouds

  @Override
  public Boolean createOrPropagate(Throwable t) throws Exception {
   if (HttpUtils.contains404(t)) {
     return true;
   }
   AtmosResponseException exception = getFirstThrowableOfType(t, AtmosResponseException.class);
   if (exception != null && exception.getError().getCode() == AtmosErrorCode.DIRECTORY_NOT_EMPTY.getCode()) {
     return false;
   }
   throw propagate(t);
  }
}
origin: org.apache.jclouds.api/atmos

public AtmosResponseException(HttpCommand command, HttpResponse response,
    AtmosError error) {
 super(String.format("command %s failed with code %s, error: %s", command.getCurrentRequest()
      .getRequestLine(), response.getStatusCode(), error.toString()), command, response);
 this.setError(error);
}
origin: io.cloudsoft.jclouds.api/atmos

public AtmosError getResult() {
 return new AtmosError(code, message);
}
origin: org.apache.jclouds.api/atmos

public AtmosError parseAtmosErrorFromContent(HttpCommand command, HttpResponse response, InputStream content)
    throws HttpException {
 AtmosError error = factory.create(errorHandlerProvider.get()).parse(content);
 if (error.getCode() == AtmosErrorCode.SIGNATURE_MISMATCH.getCode()) {
   error.setStringSigned(signer.createStringToSign(command.getCurrentRequest()));
 }
 return error;
}
origin: Nextdoor/bender

if (error != null && error.getCode() == AtmosErrorCode.RESOURCE_ALREADY_EXISTS.getCode()) {
 File file = new File(command.getCurrentRequest().getEndpoint().getPath());
 exception = new KeyAlreadyExistsException(file.getParentFile().getAbsolutePath(), file.getName());
 case 404:
   if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
    String message = error != null ? error.getMessage() : String.format("%s -> %s", command.getCurrentRequest()
       .getRequestLine(), response.getStatusLine());
    String path = command.getCurrentRequest().getEndpoint().getPath();
origin: jclouds/legacy-jclouds

  public void testApplyInputStream() {
   InputStream is = getClass().getResourceAsStream("/error.xml");
   ParseSax<AtmosError> parser = createParser();
   AtmosError result = parser.parse(is);
   assertEquals(result.getCode(), 1003);
  }
}
org.jclouds.atmos.domainAtmosError

Javadoc

When an Atmos Storage request is in error, the client receives an error response. Provides access to EMC Atmos Online Storage resources via their REST API.

Most used methods

  • getCode
  • <init>
  • getMessage
  • setStringSigned
  • toString

Popular in Java

  • Making http requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • JList (javax.swing)
  • Top Vim plugins
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