C
- the type of AdsServiceClient
S
- the type of AdsSession
D
- the type of AdsServiceDescriptor
public abstract class BaseAdsServiceClientFactoryHelper<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor> extends Object implements AdsServiceClientFactoryHelper<C,S,D>
AdsServiceClientFactoryHelper
.Constructor and Description |
---|
BaseAdsServiceClientFactoryHelper(FactoryModule.AdsServiceClientFactoryInterface<C,S,D> adsServiceClientFactory,
FactoryModule.AdsServiceDescriptorFactoryInterface<D> adsServiceDescriptorFactory,
SoapClientHandlerInterface<?> soapClientHandler)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkServiceClientPreconditions(S adsSession,
Class<?> interfaceClass)
Default implementation of passing service client preconditions.
|
C |
createAdsServiceClient(D adsServiceDescriptor,
S adsSession)
|
D |
createServiceDescriptor(Class<?> interfaceClass,
String version)
Creates an
AdsServiceDescriptor for a specified service. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
determineVersion
public BaseAdsServiceClientFactoryHelper(FactoryModule.AdsServiceClientFactoryInterface<C,S,D> adsServiceClientFactory, FactoryModule.AdsServiceDescriptorFactoryInterface<D> adsServiceDescriptorFactory, SoapClientHandlerInterface<?> soapClientHandler)
adsServiceClientFactory
- the Guice service client factory.public C createAdsServiceClient(D adsServiceDescriptor, S adsSession) throws ServiceException
createAdsServiceClient
in interface AdsServiceClientFactoryHelper<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
adsServiceDescriptor
- descriptor with information on ads serviceadsSession
- the session associated with the desired
clientAdsServiceClient
ServiceException
- if the ads service client could not be createdpublic D createServiceDescriptor(Class<?> interfaceClass, String version)
AdsServiceDescriptor
for a specified service.createServiceDescriptor
in interface AdsServiceClientFactoryHelper<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
interfaceClass
- the ads service that we want a descriptor forversion
- the version of the servicepublic void checkServiceClientPreconditions(S adsSession, Class<?> interfaceClass) throws ServiceException
checkServiceClientPreconditions
in interface AdsServiceClientFactoryHelper<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor>
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.