Package org.robolectric.fakes
Interface RoboExtendedResponseCache
-
public interface RoboExtendedResponseCache
A response cache that supports statistics tracking and updating stored responses. Implementations ofResponseCache
should implement this interface to receive additional support from the HTTP engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
trackConditionalCacheHit()
Track an conditional GET that was satisfied by this cache.void
trackResponse(RoboResponseSource source)
Track an HTTP response being satisfied bysource
.void
update(CacheResponse conditionalCacheHit, HttpURLConnection httpConnection)
Updates stored HTTP headers using a hit on a conditional GET.
-
-
-
Method Detail
-
trackResponse
void trackResponse(RoboResponseSource source)
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
void update(CacheResponse conditionalCacheHit, HttpURLConnection httpConnection)
Updates stored HTTP headers using a hit on a conditional GET.- Parameters:
conditionalCacheHit
- Conditional cache hit.httpConnection
- Http connection.
-
-