public class DefaultLiveWebRedirector extends Object implements LiveWebRedirector
LiveWebRedirector.LiveWebState, LiveWebRedirector.RedirectType
Modifier and Type | Field and Description |
---|---|
protected LiveWebRequestHandler |
liveWebHandler |
protected String |
liveWebPrefix |
protected Properties |
statusLiveWebPolicy |
DEFAULT
Constructor and Description |
---|
DefaultLiveWebRedirector() |
DefaultLiveWebRedirector(String liveWebPrefix) |
Modifier and Type | Method and Description |
---|---|
LiveWebRequestHandler |
getLiveWebHandler() |
String |
getLiveWebPrefix() |
Properties |
getStatusLiveWebPolicy() |
LiveWebRedirector.LiveWebState |
handleRedirect(WaybackException e,
WaybackRequest wbRequest,
javax.servlet.http.HttpServletRequest httpRequest,
javax.servlet.http.HttpServletResponse httpResponse)
Check the statusLiveWebType to see if, given the WaybackExceptions
status code, should redirect ALL, NONE or EMBEDS_ONLY
Before redirecting, will always check with liveweb to see if it returns a 200 request,
then redirect to same request, resulting in 2 checks to liveweb
"default" property is checked if no property is found for current access code
or for other exceptions
If default property is missing, default is to not redirect
|
void |
setLiveWebHandler(LiveWebRequestHandler liveWebHandler) |
void |
setLiveWebPrefix(String liveWebPrefix) |
void |
setStatusLiveWebPolicy(Properties statusLiveWebPolicy) |
protected String liveWebPrefix
protected Properties statusLiveWebPolicy
protected LiveWebRequestHandler liveWebHandler
public DefaultLiveWebRedirector()
public DefaultLiveWebRedirector(String liveWebPrefix)
public LiveWebRedirector.LiveWebState handleRedirect(WaybackException e, WaybackRequest wbRequest, javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse) throws IOException
handleRedirect
in interface LiveWebRedirector
e
- IOException
public String getLiveWebPrefix()
getLiveWebPrefix
in interface LiveWebRedirector
public void setLiveWebPrefix(String liveWebPrefix)
public Properties getStatusLiveWebPolicy()
public void setStatusLiveWebPolicy(Properties statusLiveWebPolicy)
public LiveWebRequestHandler getLiveWebHandler()
public void setLiveWebHandler(LiveWebRequestHandler liveWebHandler)
Copyright © 2005–2017 IIPC. All rights reserved.