com.google.api.ads.common.lib.factory
Class BaseServices<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
java.lang.Object
com.google.api.ads.common.lib.factory.BaseServices<C,S,D>
- Type Parameters:
C - the type of AdsServiceClientS - the type of AdsSessionD - the type of AdsServiceDescriptor
- Direct Known Subclasses:
- BaseAdWordsServices, BaseDfaServices, BaseDfpServices
public abstract class BaseServices<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
- extends Object
Base for a utility class which creates service clients.
- Author:
- Joseph DiLallo
|
Method Summary |
|
get(S session,
Class<T> interfaceClass)
Gets a client for the service represented by the interface with a reference
to the session. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseServices
protected BaseServices(BaseAdsServiceClientFactory<C,S,D> factory)
- Constructor.
- Parameters:
factory - a factory capable of instantiating service clients
get
public <T> T get(S session,
Class<T> interfaceClass)
- Gets a client for the service represented by the interface with a reference
to the session.
- Type Parameters:
T - the service type- Parameters:
session - your current sessioninterfaceClass - the service interface class. This is a class
representing a SOAP service
- Returns:
- the client for the service
Copyright © 2012. All Rights Reserved.