|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface HttpResponseProxy
Http responses can be large and they are only needed when the corresponding http request matched. So we don't need and don't want to keep all responses for expected http requests in memory.
This proxy knows how to fetch and build the http response but does not necessary keep it in memory. It can fetch the response lazily. It also keeps track if the response has already been consumed or not. In that way we can support different responses for same request and we can check if we have the exact amount of expected calls for a request.
AbstractHttpResponseProvider| Method Summary | |
|---|---|
HttpResponse |
consume()
Consumes HttpResponse. |
boolean |
consumed()
Indicates if the HttpResponse has already been consumed. |
HttpResponse |
getResponse()
Gets HttpResponse. |
| Method Detail |
|---|
boolean consumed()
true in case consume() has already been called before or
false in case it has not been called yet.HttpResponse getResponse()
HttpResponse consume()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||