C
- the subclass of AdsServiceClient
S
- the subclass of AdsSession
D
- the subclass of AdsServiceDescriptor
public interface AdsServiceClientFactoryHelper<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
Modifier and Type | Method and Description |
---|---|
void |
checkServiceClientPreconditions(S adsSession,
Class<?> interfaceClass)
Checks preconditions of the session and interface and throws an exception
if the client cannot be generated.
|
C |
createAdsServiceClient(D adsServiceDescriptor,
S adsSession)
Creates an
AdsServiceClient for the descriptor, session, and
endpoint. |
D |
createServiceDescriptor(Class<?> interfaceClass,
String version)
Creates an
AdsServiceDescriptor for a specified service. |
String |
determineVersion(Class<?> interfaceClass)
Determines what API version an ads service belongs to.
|
D createServiceDescriptor(Class<?> interfaceClass, String version)
AdsServiceDescriptor
for a specified service.interfaceClass
- the ads service that we want a descriptor forversion
- of the serviceC createAdsServiceClient(D adsServiceDescriptor, S adsSession) throws ServiceException
AdsServiceClient
for the descriptor, session, and
endpoint.adsServiceDescriptor
- the ads service descriptoradsSession
- the sessionServiceException
- if there was a problem creating the clientString determineVersion(Class<?> interfaceClass)
interfaceClass
- the interface class of the servicevoid checkServiceClientPreconditions(S adsSession, Class<?> interfaceClass) throws ServiceException
adsSession
- the session containing the authentication methodinterfaceClass
- the ads service that a client is being generated forServiceException
- if the preconditions are not met for service client
creationCopyright © 2018. All Rights Reserved.