com.koushikdutta.async.http
Class ResponseCacheMiddleware
java.lang.Object
com.koushikdutta.async.http.SimpleMiddleware
com.koushikdutta.async.http.ResponseCacheMiddleware
- All Implemented Interfaces:
- AsyncHttpClientMiddleware
public class ResponseCacheMiddleware
- extends SimpleMiddleware
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
addCache
public static ResponseCacheMiddleware addCache(AsyncHttpClient client,
java.io.File cacheDir,
long size)
throws java.io.IOException
- Throws:
java.io.IOException
setCaching
public void setCaching(boolean caching)
getCaching
public boolean getCaching()
getSocket
public Cancellable getSocket(AsyncHttpClientMiddleware.GetSocketData data)
- Specified by:
getSocket in interface AsyncHttpClientMiddleware- Overrides:
getSocket in class SimpleMiddleware
getConditionalCacheHitCount
public int getConditionalCacheHitCount()
getCacheHitCount
public int getCacheHitCount()
getNetworkCount
public int getNetworkCount()
getCacheStoreCount
public int getCacheStoreCount()
onBodyDecoder
public void onBodyDecoder(AsyncHttpClientMiddleware.OnBodyData data)
- Specified by:
onBodyDecoder in interface AsyncHttpClientMiddleware- Overrides:
onBodyDecoder in class SimpleMiddleware
onRequestComplete
public void onRequestComplete(AsyncHttpClientMiddleware.OnRequestCompleteData data)
- Specified by:
onRequestComplete in interface AsyncHttpClientMiddleware- Overrides:
onRequestComplete in class SimpleMiddleware
clear
public void clear()
throws java.io.IOException
- Throws:
java.io.IOException