|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ResourceFactory
Generates Resource instances for handling cached
HTTP response bodies.
| Method Summary | |
|---|---|
Resource |
copy(String requestId,
Resource resource)
Clones an existing Resource. |
Resource |
generate(String requestId,
InputStream instream,
InputLimit limit)
Creates a Resource from a given response body. |
| Method Detail |
|---|
Resource generate(String requestId,
InputStream instream,
InputLimit limit)
throws IOException
Resource from a given response body.
requestId - a unique identifier for this particular
response bodyinstream - the original InputStream
containing the response body of the origin HTTP response.limit - maximum number of bytes to consume of the
response body; if this limit is reached before the
response body is fully consumed, mark the limit has
having been reached and return a Resource
containing the data read to that point.
Resource containing however much of
the response body was successfully read.
IOException
Resource copy(String requestId,
Resource resource)
throws IOException
Resource.
requestId - unique identifier provided to associate
with the cloned response body.resource - the original response body to clone.
Resource copy
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||