org.apache.wicket.request.cycle
Interface IRequestCycleListener

All Known Implementing Classes:
AbstractRequestCycleListener, RequestCycleListenerCollection

public interface IRequestCycleListener

A callback interface for various methods in the request cycle. If you are creating a framework that needs to do something in this methods, rather than extending RequestCycle or one of its subclasses, you should implement this callback and allow users to add your listener to their custom request cycle. These listeners can be added directly to the request cycle when it is created or to the Application

Author:
Jeremy Thomerson
See Also:
Application#addRequestCycleListener(IRequestCycleListener), RequestCycle#register(IRequestCycleListener)

Method Summary
 void onBeginRequest(RequestCycle cycle)
          Called when the request cycle object is beginning its response
 void onDetach(RequestCycle cycle)
          Called after the request cycle has been detached
 void onEndRequest(RequestCycle cycle)
          Called when the request cycle object has finished its response
 IRequestHandler onException(RequestCycle cycle, Exception ex)
          Called when there is an exception in the request cycle that would normally be handled by RequestCycle.handleException(Exception) Note that in the event of an exception, #onEndRequest() will still be called after these listeners have #onException(Exception) called
 

Method Detail

onBeginRequest

void onBeginRequest(RequestCycle cycle)
Called when the request cycle object is beginning its response

Parameters:
cycle -

onEndRequest

void onEndRequest(RequestCycle cycle)
Called when the request cycle object has finished its response

Parameters:
cycle -

onDetach

void onDetach(RequestCycle cycle)
Called after the request cycle has been detached

Parameters:
cycle -

onException

IRequestHandler onException(RequestCycle cycle,
                            Exception ex)
Called when there is an exception in the request cycle that would normally be handled by RequestCycle.handleException(Exception) Note that in the event of an exception, #onEndRequest() will still be called after these listeners have #onException(Exception) called

Parameters:
cycle -
ex - the exception that was passed in to RequestCycle.handleException(Exception)
Returns:
request handler that will be exectued or null if none. If a request handler is returned, it will override any configured exception mapper


Copyright © 2004-2011 Apache Software Foundation. All Rights Reserved.