|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.AbstractModule
com.google.api.ads.common.lib.AdsModule<C,D,S>
C - the subclass of AdsServiceClientD - the subclass of AdsServiceDescriptorS - the subclass of AdsSessionpublic class AdsModule<C extends AdsServiceClient<S,D>,D extends AdsServiceDescriptor,S extends AdsSession>
Guice module for common bindings.
| Constructor Summary | |
|---|---|
AdsModule()
Default constructor. |
|
| Method Summary | ||
|---|---|---|
protected void |
configure()
Configure common Guice bindings. |
|
protected void |
configureAuthentication()
|
|
protected
|
configureFactories(com.google.inject.TypeLiteral adsServiceClientFactoryTypeLiteral,
com.google.inject.TypeLiteral adsServiceDescriptorFactoryTypeLiteral,
com.google.inject.TypeLiteral adsServiceClientTypeLiteral,
com.google.inject.TypeLiteral adsServiceDescriptorTypeLiteral,
Class<H> factoryHelperClass,
Class<?> factoryClass)
Configures the factories. |
|
protected void |
configureLogging(String loggerPrefix)
Configures the loggers given the prefix. |
|
protected void |
configureSoap(Class<?> moduleFromFactoryConfiguration,
Class<? extends Annotation> moduleAnnotationClass)
Configures which SOAP framework to use. |
|
| 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 |
|---|
public AdsModule()
| Method Detail |
|---|
protected void configure()
configure in class com.google.inject.AbstractModuleprotected void configureAuthentication()
protected void configureSoap(Class<?> moduleFromFactoryConfiguration,
Class<? extends Annotation> moduleAnnotationClass)
IllegalStateException, at least one of two possible states must
exist:
1) A moduleFromFactoryConfiguration module was specified and can be
instantiated.
2) Exactly one module on the classpath is annotated with
moduleAnnotationClass and can be instantiated.
moduleFromFactoryConfiguration - the Class of the SOAP module
to use which was specified in the user's properties file. If no
class was specified, this is expected to be null.moduleAnnotationClass - the Annotation used to mark classes
that are valid modules to use with this product. If no
moduleFromFactoryConfiguration was specified, the classpath
will be searched for classes with this annotation.
IllegalStateException - if no SOAP module is available or more than
one SOAP module is available.protected void configureLogging(String loggerPrefix)
loggerPrefix - the logger prefix
protected <H extends AdsServiceClientFactoryHelper<C,S,D>> void configureFactories(com.google.inject.TypeLiteral adsServiceClientFactoryTypeLiteral,
com.google.inject.TypeLiteral adsServiceDescriptorFactoryTypeLiteral,
com.google.inject.TypeLiteral adsServiceClientTypeLiteral,
com.google.inject.TypeLiteral adsServiceDescriptorTypeLiteral,
Class<H> factoryHelperClass,
Class<?> factoryClass)
H - the subclass of AdsServiceClientFactoryHelperadsServiceClientFactoryTypeLiteral - the factory type literal which
contains a FactoryModule.AdsServiceClientFactoryInterfaceadsServiceDescriptorFactoryTypeLiteral - the factory type literal
which contains a FactoryModule.AdsServiceDescriptorFactoryInterfaceadsServiceClientTypeLiteral - the ads service client literal which
contains a AdsServiceClientadsServiceDescriptorTypeLiteral - the ads service descriptor literal
which contains a AdsServiceDescriptorfactoryHelperClass - the factory helper classfactoryClass - the factory class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||