public class DfaAxisHeaderHandler extends Object implements HeaderHandler<DfaSession,DfaServiceDescriptor>
HeaderHandler
.HeaderHandler.NoOpHeaderHandler<S extends AdsSession,D extends AdsServiceDescriptor>
Constructor and Description |
---|
DfaAxisHeaderHandler(SoapClientHandlerInterface soapClientHandler,
com.google.api.ads.dfa.lib.conf.DfaApiConfiguration dfaApiConfiguration,
com.google.api.ads.common.lib.conf.AdsLibConfiguration adsLibConfiguration,
LoginTokens loginTokens,
UserAgentCombiner userAgentCombiner,
AuthorizationHeaderHandler authorizationHeaderHandler)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
generateAuthToken(DfaServiceDescriptor dfaServiceDescriptor,
DfaSession dfaSession)
Generates an authentication token for use with the current session.
|
void |
setHeaders(Object soapClient,
DfaSession dfaSession,
DfaServiceDescriptor dfaServiceDescriptor)
Sets the headers on the SOAP client using the session and descriptor.
|
@Inject public DfaAxisHeaderHandler(SoapClientHandlerInterface soapClientHandler, com.google.api.ads.dfa.lib.conf.DfaApiConfiguration dfaApiConfiguration, com.google.api.ads.common.lib.conf.AdsLibConfiguration adsLibConfiguration, LoginTokens loginTokens, UserAgentCombiner userAgentCombiner, AuthorizationHeaderHandler authorizationHeaderHandler)
soapClientHandler
- the SOAP client handlerdfaApiConfiguration
- the DFA API configurationloginTokens
- the login ticket provideruserAgentCombiner
- the full user agent providerauthorizationHeaderHandler
- the authorization header handlerpublic void setHeaders(Object soapClient, DfaSession dfaSession, DfaServiceDescriptor dfaServiceDescriptor) throws AuthenticationException, ServiceException
HeaderHandler
setHeaders
in interface HeaderHandler<DfaSession,DfaServiceDescriptor>
soapClient
- the SOAP clientdfaSession
- the ads sessiondfaServiceDescriptor
- the ads service descriptorAuthenticationException
- if there was a problem authenticating the
sessionServiceException
- if there was a problem setting the headersHeaderHandler.setHeaders(Object,
com.google.api.ads.common.lib.client.AdsSession,
com.google.api.ads.common.lib.client.AdsServiceDescriptor)
protected String generateAuthToken(DfaServiceDescriptor dfaServiceDescriptor, DfaSession dfaSession) throws LoginTokenException
dfaServiceDescriptor
- the DFA service descriptordfaSession
- the session in useLoginTokenException
- thrown if generating a token failsCopyright © 2015. All Rights Reserved.