C
- the type of AdsServiceClient
S
- the type of AdsSession
D
- the type of AdsServiceDescriptor
public class AdsServiceClientFactory<C extends AdsServiceClient<S,D>,S extends AdsSession,D extends AdsServiceDescriptor> extends Object
Constructor and Description |
---|
AdsServiceClientFactory(AdsServiceClientFactoryHelper adsServiceClientFactoryHelper)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected <T> T |
createServiceClientProxy(D adsServiceDescriptor,
C adsServiceClient)
Creates a proxy around the given
AdsServiceClient . |
<T> T |
getServiceClient(S adsSession,
Class<T> interfaceClass)
Gets a client given a session and the class of the desired stub interface.
|
@Inject public AdsServiceClientFactory(AdsServiceClientFactoryHelper adsServiceClientFactoryHelper)
adsServiceClientFactoryHelper
- the ads service client factory helper.public <T> T getServiceClient(S adsSession, Class<T> interfaceClass) throws ServiceException
T
- the service typeadsSession
- the session associated with the desired
clientinterfaceClass
- the class type of the desired clientServiceException
- if the service client could not be createdprotected <T> T createServiceClientProxy(D adsServiceDescriptor, C adsServiceClient)
AdsServiceClient
.T
- the service typeadsServiceDescriptor
- descriptor with information on ads serviceadsServiceClient
- client to be wrapped in a proxyCopyright © 2015. All Rights Reserved.