public class

GoogleGDataRequest

extends HttpGDataRequest
java.lang.Object
   ↳ com.google.gdata.client.http.HttpGDataRequest
     ↳ com.google.gdata.client.http.GoogleGDataRequest

Class Overview

The GoogleGDataRequest class provides a basic implementation of an interface to connect with a Google-GData server.

Summary

Nested Classes
class GoogleGDataRequest.Factory The GoogleGDataRequest.Factory class is a factory class for constructing new GoogleGDataRequest instances. 
class GoogleGDataRequest.GoogleCookie Google cookie. 
Constants
String DISABLE_COOKIE_HANDLER_PROPERTY If set, this System property will globally disable interception and handling of cookies for all GData services.
[Expand]
Inherited Constants
From class com.google.gdata.client.http.HttpGDataRequest
Fields
private static final ThreadLocal<GoogleService> activeService Holds the GoogleService that is executing requests for the current execution thread.
private static final GoogleGDataRequest.GoogleCookieHandler googleCookieHandler The global CookieHandler instance for GData services.
private static final Logger logger
private Version responseVersion The version associated with the response.
private GoogleService service The GoogleService instance that constructed the request.
[Expand]
Inherited Fields
From class com.google.gdata.client.http.HttpGDataRequest
Protected Constructors
GoogleGDataRequest(Service.GDataRequest.RequestType type, URL requestUrl, ContentType contentType, HttpAuthToken authToken, Map<String, String> headerMap, Map<String, String> privateHeaderMap, HttpUrlConnectionSource connectionSource)
Constructs a new GoogleGDataRequest instance of the specified RequestType, targeting the specified URL with the specified authentication token.
Public Methods
void execute()
Executes the GData service request.
Version getRequestVersion()
Returns the Version that will be used to execute the request on the target service or null if the service is not versioned.
Version getResponseVersion()
Returns the Version that was used by the target service to execute the request or null if the service is not versioned.
void setService(GoogleService service)
Sets the GoogleService associated with the request.
Protected Methods
void handleErrorResponse()
Handles an error response received while executing a GData service request.
[Expand]
Inherited Methods
From class com.google.gdata.client.http.HttpGDataRequest
From class java.lang.Object
From interface com.google.gdata.client.Service.GDataRequest

Constants

public static final String DISABLE_COOKIE_HANDLER_PROPERTY

If set, this System property will globally disable interception and handling of cookies for all GData services.

Constant Value: "com.google.gdata.DisableCookieHandler"

Fields

private static final ThreadLocal<GoogleService> activeService

Holds the GoogleService that is executing requests for the current execution thread.

private static final GoogleGDataRequest.GoogleCookieHandler googleCookieHandler

The global CookieHandler instance for GData services.

private static final Logger logger

private Version responseVersion

The version associated with the response.

private GoogleService service

The GoogleService instance that constructed the request.

Protected Constructors

protected GoogleGDataRequest (Service.GDataRequest.RequestType type, URL requestUrl, ContentType contentType, HttpAuthToken authToken, Map<String, String> headerMap, Map<String, String> privateHeaderMap, HttpUrlConnectionSource connectionSource)

Constructs a new GoogleGDataRequest instance of the specified RequestType, targeting the specified URL with the specified authentication token.

Parameters
type Type of GDataRequest
requestUrl Request target URL
contentType
authToken Token authenticating request to server
headerMap Map containing additional headers to set
privateHeaderMap Map containing additional headers to set that should not be logged (eg. authentication info)
connectionSource
Throws
IOException on error initializing service connection

Public Methods

public void execute ()

Executes the GData service request.

Throws
IOException
ServiceException

public Version getRequestVersion ()

Returns the Version that will be used to execute the request on the target service or null if the service is not versioned.

Returns
  • version sent with the request or null.

public Version getResponseVersion ()

Returns the Version that was used by the target service to execute the request or null if the service is not versioned.

Returns
  • version returned with the response or null.

public void setService (GoogleService service)

Sets the GoogleService associated with the request.

Parameters
service

Protected Methods

protected void handleErrorResponse ()

Handles an error response received while executing a GData service request. Throws a ServiceException or one of its subclasses, depending on the failure conditions.

Throws
IOException
ServiceException