org.archive.wayback.replay
Interface ClosestResultSelector

All Known Implementing Classes:
ArchivalUrlDateRedirectingClosestResultSelector, DateRedirectingClosestResultSelector, DefaultClosestResultSelector

public interface ClosestResultSelector

New interface component on Replay to allow customized selection of the "best" particular search result from a set to return for a particular request. Also allows specific Replay instances to optionally bounce the user to a better URL, via a BetterRequestException.

Author:
brad

Method Summary
 CaptureSearchResult getClosest(WaybackRequest wbRequest, CaptureSearchResults results)
          Locate and return the best matching search result from a set for a given request.
 

Method Detail

getClosest

CaptureSearchResult getClosest(WaybackRequest wbRequest,
                               CaptureSearchResults results)
                               throws BetterRequestException
Locate and return the best matching search result from a set for a given request.

Parameters:
wbRequest - The WaybackRequest being handled
results - the CaptureSeachResults found matching the request
Returns:
the best CaptureSearchResult, which should be replayed to the user.
Throws:
BetterRequestException - if the user should be redirected to a different, better URL to make this request.


Copyright © 2005-2011 Internet Archive. All Rights Reserved.