Package org.robolectric.fakes
Interface RoboExtendedResponseCache
public interface RoboExtendedResponseCache
A response cache that supports statistics tracking and updating stored
responses. Implementations of
ResponseCache should implement this
interface to receive additional support from the HTTP engine.-
Method Summary
Modifier and TypeMethodDescriptionvoidTrack an conditional GET that was satisfied by this cache.voidtrackResponse(RoboResponseSource source) Track an HTTP response being satisfied bysource.voidupdate(CacheResponse conditionalCacheHit, HttpURLConnection httpConnection) Updates stored HTTP headers using a hit on a conditional GET.
-
Method Details
-
trackResponse
Track an HTTP response being satisfied bysource.- Parameters:
source- Response source.
-
trackConditionalCacheHit
void trackConditionalCacheHit()Track an conditional GET that was satisfied by this cache. -
update
Updates stored HTTP headers using a hit on a conditional GET.- Parameters:
conditionalCacheHit- Conditional cache hit.httpConnection- Http connection.
-