org.apache.wicket.core.request.handler
Class RequestSettingRequestHandler

java.lang.Object
  extended by org.apache.wicket.core.request.handler.RequestSettingRequestHandler
All Implemented Interfaces:
IRequestHandler, IRequestHandlerDelegate

public class RequestSettingRequestHandler
extends Object
implements IRequestHandlerDelegate

A 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.

Author:
Jesse Long

Constructor Summary
RequestSettingRequestHandler(Request request, IRequestHandler delegate)
          Creates a new instance
 
Method Summary
 void detach(IRequestCycle requestCycle)
           
 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestSettingRequestHandler

public RequestSettingRequestHandler(Request request,
                                    IRequestHandler delegate)
Creates a new instance

Parameters:
request - The request to use when responding
delegate - 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 interface IRequestHandlerDelegate
Returns:
the request handler to which responding will be delegated.

respond

public void respond(IRequestCycle requestCycle)
Specified by:
respond in interface IRequestHandler

detach

public void detach(IRequestCycle requestCycle)
Specified by:
detach in interface IRequestHandler


Copyright © 2006-2013 Apache Software Foundation. All Rights Reserved.