public class RequestSettingRequestHandler extends Object implements IRequestHandlerDelegate
IRequestHandler
that sets the current Request
before delegating the responding
to a wrapped request handler. This is useful when the request received from the browser is not the same
request used to respond, like when the request mapper clones the request with a new URL.Constructor and Description |
---|
RequestSettingRequestHandler(Request request,
IRequestHandler delegate)
Creates a new instance
|
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.
|
IRequestHandler |
getDelegateHandler()
Returns the request handler to which responding will be delegated.
|
Request |
getRequest()
Returns the request that will be set before responding.
|
void |
respond(IRequestCycle requestCycle)
Generates a response.
|
public RequestSettingRequestHandler(Request request, IRequestHandler delegate)
request
- The request to use when respondingdelegate
- The request handler to delegate responding topublic Request getRequest()
public IRequestHandler getDelegateHandler()
getDelegateHandler
in interface IRequestHandlerDelegate
public void respond(IRequestCycle requestCycle)
IRequestHandler
respond
in interface IRequestHandler
requestCycle
- the current request cyclepublic void detach(IRequestCycle requestCycle)
IRequestHandler
detach
in interface IRequestHandler
requestCycle
- the current request cycleCopyright © 2006–2022 Apache Software Foundation. All rights reserved.