cz.geek.gdata.client
Class CachedRequest
java.lang.Object
com.google.gdata.client.http.HttpGDataRequest
com.google.gdata.client.http.GoogleGDataRequest
cz.geek.gdata.client.CachedRequest
- All Implemented Interfaces:
- com.google.gdata.client.Service.GDataRequest
public class CachedRequest
- extends com.google.gdata.client.http.GoogleGDataRequest
| Nested classes/interfaces inherited from class com.google.gdata.client.http.GoogleGDataRequest |
com.google.gdata.client.http.GoogleGDataRequest.Factory, com.google.gdata.client.http.GoogleGDataRequest.GoogleCookie |
| Nested classes/interfaces inherited from interface com.google.gdata.client.Service.GDataRequest |
com.google.gdata.client.Service.GDataRequest.RequestType |
| Fields inherited from class com.google.gdata.client.http.GoogleGDataRequest |
DISABLE_COOKIE_HANDLER_PROPERTY |
| Fields inherited from class com.google.gdata.client.http.HttpGDataRequest |
connectionSource, connectTimeout, executed, expectsInput, hasOutput, httpConn, inputType, METHOD_OVERRIDE_HEADER, METHOD_OVERRIDE_PROPERTY, readTimeout, requestUrl, type |
|
Constructor Summary |
protected |
CachedRequest(cz.geek.cache.Cache<java.lang.String,CachedResponse> cache,
com.google.gdata.client.Service.GDataRequest.RequestType type,
java.net.URL requestUrl,
com.google.gdata.util.ContentType contentType,
com.google.gdata.client.http.HttpAuthToken authToken,
java.util.Map<java.lang.String,java.lang.String> headerMap,
java.util.Map<java.lang.String,java.lang.String> privateHeaderMap,
com.google.gdata.client.http.HttpUrlConnectionSource connectionSource)
|
| Methods inherited from class com.google.gdata.client.http.GoogleGDataRequest |
getRequestVersion, getResponseVersion, handleErrorResponse, setService |
| Methods inherited from class com.google.gdata.client.http.HttpGDataRequest |
checkResponse, end, getConnection, getParseSource, getRequestConnection, getRequestContentType, getRequestStream, getRequestUrl, getRequestWriter, setConnectTimeout, setEtag, setHeader, setIfModifiedSince, setMethod, setPrivateHeader, setReadTimeout |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
protected cz.geek.cache.Cache<java.lang.String,CachedResponse> cache
resp
protected CachedResponse resp
CachedRequest
protected CachedRequest(cz.geek.cache.Cache<java.lang.String,CachedResponse> cache,
com.google.gdata.client.Service.GDataRequest.RequestType type,
java.net.URL requestUrl,
com.google.gdata.util.ContentType contentType,
com.google.gdata.client.http.HttpAuthToken authToken,
java.util.Map<java.lang.String,java.lang.String> headerMap,
java.util.Map<java.lang.String,java.lang.String> privateHeaderMap,
com.google.gdata.client.http.HttpUrlConnectionSource connectionSource)
throws java.io.IOException
- Throws:
java.io.IOException
execute
public void execute()
throws java.io.IOException,
com.google.gdata.util.ServiceException
-
Skips if request is in cache.
- Specified by:
execute in interface com.google.gdata.client.Service.GDataRequest- Overrides:
execute in class com.google.gdata.client.http.GoogleGDataRequest
- Throws:
java.io.IOException
com.google.gdata.util.ServiceException
isCachable
protected boolean isCachable()
getResponseStream
public java.io.InputStream getResponseStream()
throws java.io.IOException
- Specified by:
getResponseStream in interface com.google.gdata.client.Service.GDataRequest- Overrides:
getResponseStream in class com.google.gdata.client.http.HttpGDataRequest
- Throws:
java.io.IOException
getResponseHeader
public java.lang.String getResponseHeader(java.lang.String headerName)
- Specified by:
getResponseHeader in interface com.google.gdata.client.Service.GDataRequest- Overrides:
getResponseHeader in class com.google.gdata.client.http.HttpGDataRequest
getResponseContentType
public com.google.gdata.util.ContentType getResponseContentType()
- Specified by:
getResponseContentType in interface com.google.gdata.client.Service.GDataRequest- Overrides:
getResponseContentType in class com.google.gdata.client.http.HttpGDataRequest
getResponseDateHeader
public com.google.gdata.data.DateTime getResponseDateHeader(java.lang.String headerName)
- Specified by:
getResponseDateHeader in interface com.google.gdata.client.Service.GDataRequest- Overrides:
getResponseDateHeader in class com.google.gdata.client.http.HttpGDataRequest
Copyright © 2011. All Rights Reserved.