Package org.jclouds.rest.annotations

Examples of org.jclouds.rest.annotations.Endpoint


   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here


   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

   };

   protected Optional<URI> getEndpointFor(Invocation invocation) {
      URI endpoint = getEndpointInParametersOrNull(invocation, injector);
      if (endpoint == null) {
         Endpoint annotation;
         if (invocation.getInvokable().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getAnnotation(Endpoint.class);
         } else if (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(Endpoint.class)) {
            annotation = invocation.getInvokable().getOwnerType().getRawType().getAnnotation(Endpoint.class);
         } else {
            logger.trace("no annotations on class or invocation.getInvoked(): %s", invocation.getInvokable());
            return Optional.absent();
         }
         endpoint = injector.getInstance(Key.get(uriSupplierLiteral, annotation.value())).get();
      }
      URI provider = injector.getInstance(Key.get(uriSupplierLiteral, org.jclouds.location.Provider.class)).get();
      return Optional.fromNullable(addHostIfMissing(endpoint, provider));
   }
View Full Code Here

TOP

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

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.