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 |
---|---|
void |
detach(IRequestCycle requestCycle)
This method is called at the end of a request cycle to indicate that processing is done and
that cleaning up of the subject(s) of this target may be done.
|
String |
getRedirectUrl() |
int |
getStatus() |
RedirectRequestHandler |
mode(RedirectRequestHandler.Mode mode) |
void |
respond(IRequestCycle requestCycle)
Generates a response.
|
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 void detach(IRequestCycle requestCycle)
IRequestHandler
detach
in interface IRequestHandler
requestCycle
- the current request cyclepublic RedirectRequestHandler mode(RedirectRequestHandler.Mode mode)
public void respond(IRequestCycle requestCycle)
IRequestHandler
respond
in interface IRequestHandler
requestCycle
- the current request cycleCopyright © 2006–2021 Apache Software Foundation. All rights reserved.