Class RequestSettingRequestHandler
- java.lang.Object
-
- org.apache.wicket.core.request.handler.RequestSettingRequestHandler
-
- All Implemented Interfaces:
IRequestHandler
,IRequestHandlerDelegate
public class RequestSettingRequestHandler extends Object implements IRequestHandlerDelegate
AIRequestHandler
that sets the currentRequest
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.- Author:
- Jesse Long
-
-
Constructor Summary
Constructors Constructor Description RequestSettingRequestHandler(Request request, IRequestHandler delegate)
Creates a new instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
RequestSettingRequestHandler
public RequestSettingRequestHandler(Request request, IRequestHandler delegate)
Creates a new instance- Parameters:
request
- The request to use when respondingdelegate
- The request handler to delegate responding to
-
-
Method Detail
-
getRequest
public Request getRequest()
Returns the request that will be set before responding.- Returns:
- the request that will be set before responding.
-
getDelegateHandler
public IRequestHandler getDelegateHandler()
Returns the request handler to which responding will be delegated.- Specified by:
getDelegateHandler
in interfaceIRequestHandlerDelegate
- Returns:
- the request handler to which responding will be delegated.
-
respond
public void respond(IRequestCycle requestCycle)
Description copied from interface:IRequestHandler
Generates a response.- Specified by:
respond
in interfaceIRequestHandler
- Parameters:
requestCycle
- the current request cycle
-
detach
public void detach(IRequestCycle requestCycle)
Description copied from interface:IRequestHandler
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.- Specified by:
detach
in interfaceIRequestHandler
- Parameters:
requestCycle
- the current request cycle
-
-