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:
OAuthCompatible, AdsSession

public class DfpSession
extends Object
implements AdsSession, OAuthCompatible

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()
           
 String getClientLoginToken()
           
 String getEndpoint()
          Returns the server endpoint to make requests against.
 String getNetworkCode()
           
 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)
           
 void setNetworkCode(String networkCode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getApplicationName

public String getApplicationName()
Returns:
the userAgent

getOAuthParameters

public com.google.api.client.auth.oauth.OAuthParameters getOAuthParameters()
Description copied from interface: OAuthCompatible
Gets the OAuth parameters.

Specified by:
getOAuthParameters in interface OAuthCompatible
Returns:
the oAuthParameters

getClientLoginToken

public String getClientLoginToken()
Returns:
the clientLoginToken

setClientLoginToken

public void setClientLoginToken(String clientLoginToken)
Parameters:
clientLoginToken - the clientLoginToken to set

getEndpoint

public String getEndpoint()
Description copied from interface: AdsSession
Returns the server endpoint to make requests against.

Specified by:
getEndpoint in interface AdsSession
Returns:
the endpoint

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()
Returns:
the networkCode

setNetworkCode

public void setNetworkCode(String networkCode)
Parameters:
networkCode - the networkCode to set


Copyright © 2012. All Rights Reserved.