public class GoogleGDataRequest extends HttpGDataRequest
| Modifier and Type | Class and Description |
|---|---|
static class |
GoogleGDataRequest.Factory
The GoogleGDataRequest.Factory class is a factory class for
constructing new GoogleGDataRequest instances.
|
static class |
GoogleGDataRequest.GoogleCookie
Google cookie.
|
Service.GDataRequest.RequestType| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DISABLE_COOKIE_HANDLER_PROPERTY
If set, this System property will globally disable interception and
handling of cookies for all GData services.
|
connectionSource, connectTimeout, executed, expectsInput, hasOutput, httpConn, inputType, METHOD_OVERRIDE_HEADER, METHOD_OVERRIDE_PROPERTY, readTimeout, requestUrl, type| Modifier | Constructor and Description |
|---|---|
protected |
GoogleGDataRequest(Service.GDataRequest.RequestType type,
java.net.URL requestUrl,
ContentType contentType,
HttpAuthToken authToken,
java.util.Map<java.lang.String,java.lang.String> headerMap,
java.util.Map<java.lang.String,java.lang.String> privateHeaderMap,
HttpUrlConnectionSource connectionSource)
Constructs a new GoogleGDataRequest instance of the specified
RequestType, targeting the specified URL with the specified
authentication token.
|
| Modifier and Type | Method and Description |
|---|---|
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. |
protected void |
handleErrorResponse()
Handles an error response received while executing a GData service request.
|
void |
setService(GoogleService service)
Sets the GoogleService associated with the request.
|
checkResponse, end, getConnection, getParseSource, getRequestConnection, getRequestContentType, getRequestStream, getRequestUrl, getRequestWriter, getResponseContentType, getResponseDateHeader, getResponseHeader, getResponseStream, setConnectTimeout, setEtag, setHeader, setIfModifiedSince, setMethod, setPrivateHeader, setReadTimeoutpublic static final java.lang.String DISABLE_COOKIE_HANDLER_PROPERTY
protected GoogleGDataRequest(Service.GDataRequest.RequestType type, java.net.URL requestUrl, ContentType contentType, HttpAuthToken authToken, java.util.Map<java.lang.String,java.lang.String> headerMap, java.util.Map<java.lang.String,java.lang.String> privateHeaderMap, HttpUrlConnectionSource connectionSource) throws java.io.IOException
type - type of GDataRequestrequestUrl - request target URLauthToken - token authenticating request to serverheaderMap - map containing additional headers to setprivateHeaderMap - map containing additional headers to set
that should not be logged (eg. authentication info)java.io.IOException - on error initializing service connectionpublic Version getRequestVersion()
Version that will be used to execute the request on the
target service or null if the service is not versioned.null.public Version getResponseVersion()
Version that was used by the target service to execute
the request or null if the service is not versioned.null.public void setService(GoogleService service)
public void execute()
throws java.io.IOException,
ServiceException
Service.GDataRequestexecute in interface Service.GDataRequestexecute in class HttpGDataRequestjava.io.IOException - error writing to or reading from GData service.ResourceNotFoundException - invalid request
target resource.ServiceException - system error executing request.protected void handleErrorResponse()
throws java.io.IOException,
ServiceException
HttpGDataRequestServiceException or one of its subclasses, depending on
the failure conditions.handleErrorResponse in class HttpGDataRequestjava.io.IOException - error reading the error response from the GData
service.ServiceException - exception describing the failure.