public class RedirectRequestHandler extends Object implements IRequestHandler
Modifier and Type | Class and Description |
---|---|
static class |
RedirectRequestHandler.Mode |
Constructor and Description |
---|
RedirectRequestHandler(String redirectUrl) |
RedirectRequestHandler(String redirectUrl,
int status) |
Modifier and Type | Method and Description |
---|---|
String |
getRedirectUrl() |
int |
getStatus() |
RedirectRequestHandler |
mode(RedirectRequestHandler.Mode mode) |
void |
respond(IRequestCycle requestCycle)
Generates a response.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
detach
public RedirectRequestHandler(String redirectUrl)
redirectUrl
- URL to redirect to.public RedirectRequestHandler(String redirectUrl, int status)
redirectUrl
- URL to redirect to.status
- 301 (Moved permanently) or 302 (Moved temporarily)public String getRedirectUrl()
public int getStatus()
public RedirectRequestHandler mode(RedirectRequestHandler.Mode mode)
public void respond(IRequestCycle requestCycle)
IRequestHandler
respond
in interface IRequestHandler
requestCycle
- the current request cycleCopyright © 2006–2022 Apache Software Foundation. All rights reserved.