Package org.jclouds.rest.annotations

Examples of org.jclouds.rest.annotations.Fallback


   protected void assertRequestLineEquals(HttpRequest request, String toMatch) {
      assertEquals(request.getRequestLine(), toMatch);
   }

   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) {
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class);
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class;
      if (expected == null)
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class);
      else
         assertEquals(assigned, expected);
   }
View Full Code Here


   protected void assertRequestLineEquals(HttpRequest request, String toMatch) {
      assertEquals(request.getRequestLine(), toMatch);
   }

   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) {
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class);
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class;
      if (expected == null)
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class);
      else
         assertEquals(assigned, expected);
   }
View Full Code Here

   protected void assertRequestLineEquals(HttpRequest request, String toMatch) {
      assertEquals(request.getRequestLine(), toMatch);
   }

   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) {
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class);
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class;
      if (expected == null)
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class);
      else
         assertEquals(assigned, expected);
   }
View Full Code Here

      }
   }

   @Override
   public org.jclouds.Fallback<?> getFallback(Invocation invocation) {
      Fallback fallback = invocation.getInvokable().getAnnotation(Fallback.class);
      if (fallback != null) {
         return injector.getInstance(fallback.value());
      }
      return defaultFallback;
   }
View Full Code Here

   protected void assertRequestLineEquals(HttpRequest request, String toMatch) {
      assertEquals(request.getRequestLine(), toMatch);
   }

   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) {
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class);
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class;
      if (expected == null)
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class);
      else
         assertEquals(assigned, expected);
   }
View Full Code Here

      }
   }

   @Override
   public org.jclouds.Fallback<?> getFallback(Invocation invocation) {
      Fallback fallback = invocation.getInvokable().getAnnotation(Fallback.class);
      if (fallback != null) {
         return injector.getInstance(fallback.value());
      }
      return defaultFallback;
   }
View Full Code Here

   protected void assertRequestLineEquals(HttpRequest request, String toMatch) {
      assertEquals(request.getRequestLine(), toMatch);
   }

   protected void assertFallbackClassEquals(Invokable<?, ?> method, @Nullable Class<?> expected) {
      Fallback fallbackAnnotation = method.getAnnotation(Fallback.class);
      Class<?> assigned = fallbackAnnotation != null ? fallbackAnnotation.value() : MapHttp4xxCodesToExceptions.class;
      if (expected == null)
         assertEquals(assigned, MapHttp4xxCodesToExceptions.class);
      else
         assertEquals(assigned, expected);
   }
View Full Code Here

      }
   }

   @Override
   public org.jclouds.Fallback<?> getFallback(Invocation invocation) {
      Fallback fallback = invocation.getInvokable().getAnnotation(Fallback.class);
      if (fallback != null) {
         return injector.getInstance(fallback.value());
      }
      return defaultFallback;
   }
View Full Code Here

TOP

Related Classes of org.jclouds.rest.annotations.Fallback

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.