org.jclouds.openstack.keystone.v2_0.config
Class KeystoneAuthenticationModule.ProviderModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.jclouds.openstack.keystone.v2_0.config.KeystoneAuthenticationModule.ProviderModule
All Implemented Interfaces:
com.google.inject.Module
Enclosing class:
KeystoneAuthenticationModule

public static class KeystoneAuthenticationModule.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 AsyncApi classes by placing it on the type. ex. @Endpoint(CloudDNS.class)
  4. add the following to your RestClientModule
  5.  bind(new TypeLiteral<Supplier<URI>>() {
     }).annotatedWith(CloudDNS.class).to(new TypeLiteral<Supplier<URI>>() {
     });
     


    Constructor Summary
    KeystoneAuthenticationModule.ProviderModule()
               
     
    Method Summary
    protected  void configure()
               
    protected  com.google.common.base.Supplier<URI> provideZoneIdToURISupplierForApiVersion(String serviceType, String apiVersion, LocationIdToURIFromAccessForTypeAndVersion.Factory factory)
               
     
    Methods inherited from class com.google.inject.AbstractModule
    addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    KeystoneAuthenticationModule.ProviderModule

    public KeystoneAuthenticationModule.ProviderModule()
    Method Detail

    configure

    protected void configure()
    Specified by:
    configure in class com.google.inject.AbstractModule

    provideZoneIdToURISupplierForApiVersion

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


    Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.