Package org.jclouds.rest

Examples of org.jclouds.rest.ResourceNotFoundException


         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
            break;
      }
      command.setException(exception);
   }
View Full Code Here


            case 403:
               exception = new AuthorizationException(message, exception);
               break;
            case 404:
               if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
                  exception = new ResourceNotFoundException(message, exception);
               }
               break;
            case 405:
               exception = new IllegalArgumentException(message, exception);
               break;
View Full Code Here

      // Create custom exception for error messages we know about
      if (SYSTEM_RECONFIGURING_PATTERN.matcher(error).matches()) {
         refinedException = new IllegalStateException(exception);
      } else if (RESOURCE_NOT_FOUND_PATTERN.matcher(error).matches()) {
         refinedException = new ResourceNotFoundException(error, exception);
      } else if (ILLEGAL_STATE_PATTERN.matcher(error).matches()) {
         refinedException = new IllegalStateException(error, exception);
      } else if (ILLEGAL_ARGUMENT_PATTERN.matcher(error).matches()) {
         refinedException = new IllegalArgumentException(error, exception);
      } else if (AUTH_PATTERN.matcher(error).matches()) {
View Full Code Here

      // Create custom exception for error codes we know about
      if (response.getStatusCode() == 401) {
         exception = new AuthorizationException(message, exception);
      } else if (response.getStatusCode() == 403 || response.getStatusCode() == 404) {
         exception = new ResourceNotFoundException(message, exception);
      }

      command.setException(exception);
   }
View Full Code Here

         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
            break;
         case 409:
            exception = new IllegalStateException(message, exception);
            break;
View Full Code Here

               response.getStatusLine());
         switch (response.getStatusCode()) {
            case 400:
               if ((command.getCurrentRequest().getEndpoint().getPath().endsWith("/info"))
                     || (message != null && message.indexOf("could not be found") != -1))
                  exception = new ResourceNotFoundException(message, exception);
               else if (message != null && message.indexOf("currently in use") != -1)
                  exception = new IllegalStateException(message, exception);
               else
                  exception = new IllegalArgumentException(message, exception);
               break;
            case 401:
               exception = new AuthorizationException(message, exception);
               break;
            case 402:
               exception = new IllegalStateException(message, exception);
               break;
            case 404:
               if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
                  exception = new ResourceNotFoundException(message, exception);
               }
               break;
            case 405:
               exception = new IllegalArgumentException(message, exception);
               break;
View Full Code Here

         case 401:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
            break;
         default:
            exception = new HttpResponseException(command, response, message);
            break;
View Full Code Here

            case 403:
               exception = new AuthorizationException(message, exception);
               break;
            case 404:
               if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
                  exception = new ResourceNotFoundException(message, exception);
               }
               break;
         }
      } finally {
         if (response.getPayload() != null) {
View Full Code Here

         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
            break;
         case 413:
            exception = new InsufficientResourcesException(message, exception);
            break;
View Full Code Here

         case 403:
            exception = new AuthorizationException(message, exception);
            break;
         case 404:
            if (!command.getCurrentRequest().getMethod().equals("DELETE")) {
               exception = new ResourceNotFoundException(message, exception);
            }
            break;
         case 409:
            exception = new IllegalStateException(message, exception);
            break;
View Full Code Here

TOP

Related Classes of org.jclouds.rest.ResourceNotFoundException

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.