Codota Logo
AtmosError
Code IndexAdd Codota 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)

  • Common ways to obtain AtmosError
private void myMethod () {
AtmosError a =
  • Codota IconString message;new AtmosError(code, message)
  • Codota IconAtmosUtils utils;HttpCommand command;HttpResponse response;utils.parseAtmosErrorFromContent(command, response, new String(data))
  • Codota IconParseSax.Factory parseSaxFactory;Provider provider;InputStream from;parseSaxFactory.create(provider.get()).parse(from)
  • Smart code suggestions by Codota
}
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

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • putExtra (Intent)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • String (java.lang)
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now