public class TransparentReplayRenderer extends Object implements ReplayRenderer
Now this class has a limited support for range requests. If the request
has Range
header, it tries to fulfill it by extracting requested
byte range from the archived content (either 200 or 206 responses).
If the Resource is not suitable for replaying the request ranges,
renderResource
throws RangeNotSatisfiable
, so that
replay process can try another capture, or take other actions.
Constructor and Description |
---|
TransparentReplayRenderer(HttpHeaderProcessor httpHeaderProcessor) |
Modifier and Type | Method and Description |
---|---|
void |
renderResource(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
WaybackRequest wbRequest,
CaptureSearchResult result,
Resource httpHeadersResource,
Resource payloadResource,
ResultURIConverter uriConverter,
CaptureSearchResults results)
Generate response that replays capture archive
httpHeadersResource , reading archived content (HTTP entity) from
payloadResource . |
void |
renderResource(javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse,
WaybackRequest wbRequest,
CaptureSearchResult result,
Resource resource,
ResultURIConverter uriConverter,
CaptureSearchResults results)
Generate response that replays capture archive
resource . |
public TransparentReplayRenderer(HttpHeaderProcessor httpHeaderProcessor)
public void renderResource(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, WaybackRequest wbRequest, CaptureSearchResult result, Resource resource, ResultURIConverter uriConverter, CaptureSearchResults results) throws javax.servlet.ServletException, IOException, SpecificCaptureReplayException
ReplayRenderer
resource
.renderResource
in interface ReplayRenderer
httpRequest
- the HttpServletRequesthttpResponse
- the HttpServletResponsewbRequest
- the WaybackRequest that returned the resultsresult
- actual CaptureSearchResult
that maps to resource to replayresource
- resource to replayuriConverter
- the URI converter to use to translate matching
results into replayable URLsresults
- all CaptureSearchResults that were returned from the
ResourceIndex
, probably including other capture dates of the same
URL.javax.servlet.ServletException
- per usualIOException
- per usualSpecificCaptureReplayException
public void renderResource(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, WaybackRequest wbRequest, CaptureSearchResult result, Resource httpHeadersResource, Resource payloadResource, ResultURIConverter uriConverter, CaptureSearchResults results) throws javax.servlet.ServletException, IOException, SpecificCaptureReplayException
ReplayRenderer
httpHeadersResource
, reading archived content (HTTP entity) from
payloadResource
.renderResource
in interface ReplayRenderer
httpRequest
- the HttpServletRequesthttpResponse
- the HttpServletResponsewbRequest
- the WaybackRequest that returned the resultsresult
- CaptureSearchResult
that maps to resource to replayhttpHeadersResource
- resource with HTTP headers to replay
(typically a revisit record.)payloadResource
- resource with payload to replayuriConverter
- the URI converter to use to translate matching
results into replayable URLsresults
- all CaptureSearchResults that were returned from the
ResourceIndex
, probably including other capture dates of
the same URL.javax.servlet.ServletException
- per usualIOException
- per usualSpecificCaptureReplayException
Copyright © 2005–2017 IIPC. All rights reserved.