Class ServiceCatalogModule.ProviderModule

java.lang.Object
com.google.inject.AbstractModule
org.jclouds.openstack.keystone.catalog.config.ServiceCatalogModule.ProviderModule
All Implemented Interfaces:
com.google.inject.Module
Enclosing class:
ServiceCatalogModule

public static class ServiceCatalogModule.ProviderModule extends com.google.inject.AbstractModule
For global services who have no regions, such as DNS. To use, do the following
  1. add this module to your ApiMetadata.getDefaultModules()
  2. create a service-specific annotation, such as @CloudDNS, and make sure that has the meta-annotation Qualifier
  3. add the above annotation to any Api classes by placing it on the type. ex. @Endpoint(CloudDNS.class)
  4. add the following to your
    invalid reference
    org.jclouds.rest.config.RestClientModule
  5.  bind(new TypeLiteral<Supplier<URI>>() {
     }).annotatedWith(CloudDNS.class).to(new TypeLiteral<Supplier<URI>>() {
     });
     
  • Constructor Details

    • ProviderModule

      public ProviderModule()
  • Method Details

    • configure

      protected void configure()
      Overrides:
      configure in class com.google.inject.AbstractModule
    • provideZoneIdToURISupplierForApiVersion

      @Provides @Singleton protected final com.google.common.base.Supplier<URI> provideZoneIdToURISupplierForApiVersion(@Named("jclouds.keystone.service-type") String serviceType, String apiVersion, LocationIdToURIFromServiceEndpointsForTypeAndVersion.Factory factory)