com.google.api.ads.dfp.lib.client
Class DfpSession

java.lang.Object
  extended by com.google.api.ads.dfp.lib.client.DfpSession
All Implemented Interfaces:
OAuth2Compatible, OAuthCompatible, AdsSession

public class DfpSession
extends Object
implements AdsSession, OAuthCompatible, OAuth2Compatible

A DfpSession represents a single session of DFP use.

Author:
Adam Rogal

Nested Class Summary
static class DfpSession.Builder
          Builder for DfpSession.
static class DfpSession.Environment
          Enum representing the endpoint server, aka environment.
 
Method Summary
 String getApplicationName()
          Gets the application name.
 String getClientLoginToken()
          Gets the client login token.
 String getEndpoint()
          Gets the endpoint.
 String getNetworkCode()
          Gets the network code.
 com.google.api.client.auth.oauth2.Credential getOAuth2Credential()
          Gets the OAuth2 credentials.
 com.google.api.client.auth.oauth.OAuthParameters getOAuthParameters()
          Gets the OAuth parameters.
 boolean isEnvironment(Endpoint environment)
          Determines if the session is for the supplied DfpSession.Environment.
 void setClientLoginToken(String clientLoginToken)
          Sets the client login token.
 void setNetworkCode(String networkCode)
          Sets the network code.
 void setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
          Sets the OAuth2 credential.
 void setOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
          Sets the OAuth parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getApplicationName

public String getApplicationName()
Gets the application name.


getOAuthParameters

public com.google.api.client.auth.oauth.OAuthParameters getOAuthParameters()
Gets the OAuth parameters.

Specified by:
getOAuthParameters in interface OAuthCompatible

setOAuthParameters

public void setOAuthParameters(com.google.api.client.auth.oauth.OAuthParameters oAuthParameters)
Sets the OAuth parameters. Any other authentication credentials on the session will be removed.


getOAuth2Credential

public com.google.api.client.auth.oauth2.Credential getOAuth2Credential()
Gets the OAuth2 credentials.

Specified by:
getOAuth2Credential in interface OAuth2Compatible

setOAuth2Credential

public void setOAuth2Credential(com.google.api.client.auth.oauth2.Credential oAuth2Credential)
Sets the OAuth2 credential. Any other authentication credentials on the session will be removed.


getClientLoginToken

public String getClientLoginToken()
Gets the client login token.


setClientLoginToken

public void setClientLoginToken(String clientLoginToken)
Sets the client login token. Any other authentication credentials on the session will be removed.


getEndpoint

public String getEndpoint()
Gets the endpoint.

Specified by:
getEndpoint in interface AdsSession

isEnvironment

public boolean isEnvironment(Endpoint environment)
Determines if the session is for the supplied DfpSession.Environment.

Specified by:
isEnvironment in interface AdsSession
Parameters:
environment - the environment to check

getNetworkCode

public String getNetworkCode()
Gets the network code.


setNetworkCode

public void setNetworkCode(String networkCode)
Sets the network code.



Copyright © 2012. All Rights Reserved.