HomeSort by relevance Sort by last modified time
    Searched full:responsecache (Results 1 - 25 of 38) sorted by null

1 2

  /libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/net/
ResponseCacheTest.java 23 import java.net.ResponseCache;
34 * java.net.ResponseCache#getDefault()
37 assertNull(ResponseCache.getDefault());
41 * java.net.ResponseCache#setDefault(ResponseCache)
45 ResponseCache rc1 = new MockResponseCache();
46 ResponseCache rc2 = new MockResponseCache();
47 ResponseCache.setDefault(rc1);
48 assertSame(ResponseCache.getDefault(), rc1);
49 ResponseCache.setDefault(rc2)
    [all...]
  /external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/
AndroidInternal.java 20 import java.net.ResponseCache;
25 * implementation including support for a custom {@link ResponseCache}.
33 public static void setResponseCache(OkUrlFactory okUrlFactory, ResponseCache responseCache) {
35 if (responseCache instanceof OkCacheContainer) {
36 // Avoid adding layers of wrappers. Rather than wrap the ResponseCache in yet another layer to
37 // make the ResponseCache look like an InternalCache, we can unwrap the Cache instead.
39 OkCacheContainer okCacheContainer = (OkCacheContainer) responseCache;
42 client.setInternalCache(responseCache != null ? new CacheAdapter(responseCache) : null)
    [all...]
OkCacheContainer.java 19 * An interface that allows OkHttp to detect that a {@link java.net.ResponseCache} contains a
AndroidShimResponseCache.java 24 import java.net.ResponseCache;
31 * A class provided for use by Android so that it can continue supporting a {@link ResponseCache}
34 public class AndroidShimResponseCache extends ResponseCache {
  /libcore/ojluni/src/main/java/java/net/
ResponseCache.java 36 * ResponseCache.setDefault(ResponseCache), and the system will call
45 * The ResponseCache implementation decides which resources
61 public abstract class ResponseCache {
67 * @see #setDefault(ResponseCache)
70 private static ResponseCache theResponseCache;
79 * @see #setDefault(ResponseCache)
80 * @return the system-wide <code>ResponseCache</code>
83 public synchronized static ResponseCache getDefault() {
96 * @param responseCache The response cache, o
    [all...]
CacheRequest.java 33 * ResponseCache. Instances of such a class provide an
CacheResponse.java 35 * ResponseCache. Instances of such a class provide an
  /external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/internal/huc/
CacheAdapterTest.java 30 import java.net.ResponseCache;
54 * <li>{@link ResponseCacheTest} for black-box tests that check that {@link ResponseCache}
83 ResponseCache responseCache = new AbstractResponseCache() {
93 Internal.instance.setCache(client, new CacheAdapter(responseCache));
105 ResponseCache responseCache = new AbstractResponseCache() {
116 Internal.instance.setCache(client, new CacheAdapter(responseCache));
135 ResponseCache responseCache = new AbstractResponseCache()
    [all...]
ResponseCacheTest.java 44 import java.net.ResponseCache;
89 * Tests the interaction between OkHttp and {@link ResponseCache}.
90 * Based on com.squareup.okhttp.CacheTest with changes for ResponseCache and HttpURLConnection.
100 private ResponseCache cache;
117 ResponseCache.setDefault(null);
227 * HttpURLConnection.getInputStream().skip(long) causes ResponseCache corruption
769 * that {@link ResponseCache} provides no mechanism for cache invalidation as the result of
    [all...]
  /external/okhttp/okhttp-android-support/src/main/java/com/squareup/okhttp/internal/huc/
CacheAdapter.java 27 import java.net.ResponseCache;
34 /** Adapts {@link ResponseCache} to {@link InternalCache}. */
36 private final ResponseCache delegate;
38 public CacheAdapter(ResponseCache delegate) {
42 public ResponseCache getDelegate() {
75 // ResponseCache. Removing items from the cache due to modifications made from this client is
83 // ResponseCache. Updating headers is useful if the server changes the metadata for a resource
99 * OkHttp {@link Request} into the arguments required by the {@link ResponseCache}.
JavaApiConverter.java 164 // This probably indicates another HTTP stack is trying to use the shared ResponseCache.
380 // Create an object of the correct class in case the ResponseCache uses instanceof.
529 * {@link java.net.ResponseCache} subclasses and no more.
842 throw new UnsupportedOperationException("ResponseCache cannot modify the request.");
846 throw new UnsupportedOperationException("ResponseCache cannot access request headers");
850 throw new UnsupportedOperationException("ResponseCache cannot access SSL internals");
854 throw new UnsupportedOperationException("ResponseCache cannot access the response body.");
  /external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/android/
HttpResponseCache.java 28 import java.net.ResponseCache;
43 public final class HttpResponseCache extends ResponseCache implements Closeable, OkCacheContainer {
56 ResponseCache installed = ResponseCache.getDefault();
75 ResponseCache installed = ResponseCache.getDefault();
92 ResponseCache.setDefault(newResponseCache);
170 if (ResponseCache.getDefault() == this) {
171 ResponseCache.setDefault(null);
180 if (ResponseCache.getDefault() == this)
    [all...]
HttpResponseCacheTest.java 29 import java.net.ResponseCache;
64 ResponseCache.setDefault(null);
70 assertSame(installed, ResponseCache.getDefault());
96 ResponseCache.setDefault(new ResponseCache() {
126 assertNull(ResponseCache.getDefault());
132 assertNull(ResponseCache.getDefault());
167 ResponseCache responseCache = ResponseCache.getDefault()
    [all...]
  /external/okhttp/android/main/java/com/squareup/okhttp/
HttpHandler.java 25 import java.net.ResponseCache;
103 ResponseCache responseCache = ResponseCache.getDefault();
104 if (responseCache != null) {
105 AndroidInternal.setResponseCache(okUrlFactory, responseCache);
  /external/okhttp/okhttp-android-support/src/test/java/com/squareup/okhttp/
AbstractResponseCache.java 21 import java.net.ResponseCache;
29 public class AbstractResponseCache extends ResponseCache {
  /cts/tests/tests/net/src/android/net/http/cts/
HttpResponseCacheTest.java 31 import java.net.ResponseCache;
53 ResponseCache.setDefault(null);
61 assertSame(installed, ResponseCache.getDefault());
87 ResponseCache.setDefault(new ResponseCache() {
114 assertNull(ResponseCache.getDefault());
120 assertNull(ResponseCache.getDefault());
  /frameworks/base/core/java/android/net/http/
HttpResponseCache.java 28 import java.net.ResponseCache;
152 public final class HttpResponseCache extends ResponseCache implements Closeable, OkCacheContainer {
165 ResponseCache installed = ResponseCache.getDefault();
184 ResponseCache installed = ResponseCache.getDefault();
200 ResponseCache.setDefault(newResponseCache);
278 if (ResponseCache.getDefault() == this) {
279 ResponseCache.setDefault(null);
288 if (ResponseCache.getDefault() == this)
    [all...]
  /external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/
OkHttpClientTest.java 29 import java.net.ResponseCache;
50 private static final ResponseCache DEFAULT_RESPONSE_CACHE = ResponseCache.getDefault();
56 ResponseCache.setDefault(DEFAULT_RESPONSE_CACHE);
141 ResponseCache.setDefault(new ResponseCache() {
  /frameworks/base/docs/html/training/efficient-downloads/
redundant_redundant.jd 19 <li><a href="#ResponseCache">Use the HttpURLConnection response cache</a></li>
67 <h2 id="ResponseCache">Use the HttpURLConnection Response Cache</h2>
  /external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/http/
HttpEngine.java 225 InternalCache responseCache = Internal.instance.internalCache(client);
226 Response cacheCandidate = responseCache != null
227 ? responseCache.get(request)
235 if (responseCache != null) {
236 responseCache.trackResponse(cacheStrategy);
530 InternalCache responseCache = Internal.instance.internalCache(client);
531 if (responseCache == null) return;
537 responseCache.remove(networkRequest);
546 storeRequest = responseCache.put(stripBody(userResponse));
802 InternalCache responseCache = Internal.instance.internalCache(client)
    [all...]
  /cts/tests/core/runner/src/com/android/cts/runner/
CtsTestRunListener.java 42 import java.net.ResponseCache;
231 ResponseCache.setDefault(null);
  /external/vogar/src/vogar/target/
TestEnvironment.java 24 import java.net.ResponseCache;
168 ResponseCache.setDefault(null);
  /libcore/ojluni/src/main/java/sun/security/util/
SecurityConstants.java 208 // java.net.ResponseCache
212 // java.net.ResponseCache
  /libcore/luni/src/test/java/libcore/java/net/
URLConnectionTest.java 44 import java.net.ResponseCache;
112 ResponseCache.setDefault(null);
    [all...]
  /frameworks/base/core/java/android/net/
Network.java 278 // TODO: HttpHandler creates OkUrlFactory instances that share the default ResponseCache.

Completed in 503 milliseconds

1 2