com.google.api.ads.common.lib.factory
Class BaseServices<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>

java.lang.Object
  extended by com.google.api.ads.common.lib.factory.BaseServices<C,S,D>
Type Parameters:
C - the type of AdsServiceClient
S - the type of AdsSession
D - 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

Constructor Summary
protected BaseServices(BaseAdsServiceClientFactory<C,S,D> factory)
          Constructor.
 
Method Summary
<T> T
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
 

Constructor Detail

BaseServices

protected BaseServices(BaseAdsServiceClientFactory<C,S,D> factory)
Constructor.

Parameters:
factory - a factory capable of instantiating service clients
Method Detail

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 session
interfaceClass - the service interface class. This is a class representing a SOAP service
Returns:
the client for the service


Copyright © 2012. All Rights Reserved.