Examples of VCloudDirectorException


Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

     
      // Try to create a VCloudDirectorException from XML payload, if it exists
      if (response.getPayload() != null && response.getPayload().getContentMetadata().getContentType().startsWith(VCloudDirectorMediaType.ERROR)) {
        try {
           Error error = JAXB.unmarshal(new ByteArrayInputStream(data), Error.class);
           exception = new VCloudDirectorException(error);
           message = error.getMessage();
        } catch (Exception e) {
           Throwables.propagate(e);
        }
      }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

      // perhaps task isn't available, yet
      if (task == null) return false;
      logger.trace("%s: looking for status %s: currently: %s", task, expectedStatuses, task.getStatus());
     
      if (failingStatuses.contains(task.getStatus())) {
         throw new VCloudDirectorException(task);
      }
      if (expectedStatuses.contains(task.getStatus())) {
         return true;
      }
      return false;
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

      // perhaps task isn't available, yet
      if (task == null) return false;

      logger.trace("%s: looking for status %s: currently: %s", task.getOperationName(), Task.Status.SUCCESS, task.getStatus());
      if (EnumSet.of(Task.Status.ERROR, Task.Status.CANCELED, Task.Status.ABORTED).contains(task.getStatus())) {
         throw new VCloudDirectorException(task);
      } else return task.getStatus().equals(Task.Status.SUCCESS);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

     
      // Try to create a VCloudDirectorException from XML payload, if it exists
      if (response.getPayload() != null && response.getPayload().getContentMetadata().getContentType().startsWith(VCloudDirectorMediaType.ERROR)) {
        try {
           Error error = JAXB.unmarshal(new ByteArrayInputStream(data), Error.class);
           exception = new VCloudDirectorException(error);
           message = error.getMessage();
        } catch (Exception e) {
           Throwables.propagate(e);
        }
      }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

      // perhaps task isn't available, yet
      if (task == null) return false;
      logger.trace("%s: looking for status %s: currently: %s", task, expectedStatuses, task.getStatus());
     
      if (failingStatuses.contains(task.getStatus())) {
         throw new VCloudDirectorException(task);
      }
      if (expectedStatuses.contains(task.getStatus())) {
         return true;
      }
      return false;
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.VCloudDirectorException

      // perhaps task isn't available, yet
      if (task == null) return false;

      logger.trace("%s: looking for status %s: currently: %s", task.getOperationName(), Task.Status.SUCCESS, task.getStatus());
      if (EnumSet.of(Task.Status.ERROR, Task.Status.CANCELED, Task.Status.ABORTED).contains(task.getStatus())) {
         throw new VCloudDirectorException(task);
      } else return task.getStatus().equals(Task.Status.SUCCESS);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.