org.apache.wicket.request.cycle
Class AbstractRequestCycleListener

java.lang.Object
  extended by org.apache.wicket.request.cycle.AbstractRequestCycleListener
All Implemented Interfaces:
IRequestCycleListener
Direct Known Subclasses:
RequestLoggerRequestCycleListener

public abstract class AbstractRequestCycleListener
extends java.lang.Object
implements IRequestCycleListener

Empty implementation of an IRequestCycleListener useful as a starting point for your own custom listener.


Constructor Summary
AbstractRequestCycleListener()
           
 
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, java.lang.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
 void onExceptionRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler, java.lang.Exception exception)
          Called when an IRequestHandler is resolved for an exception and will be executed.
 void onRequestHandlerExecuted(RequestCycle cycle, IRequestHandler handler)
          Called after an IRequestHandler has been executed.
 void onRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler)
          Called when an IRequestHandler is resolved and will be executed.
 void onRequestHandlerScheduled(RequestCycle cycle, IRequestHandler handler)
          Called when a IRequestHandler has been scheduled.
 void onUrlMapped(RequestCycle cycle, IRequestHandler handler, Url url)
          Called after a Url is generated for a IRequestHandler.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRequestCycleListener

public AbstractRequestCycleListener()
Method Detail

onBeginRequest

public void onBeginRequest(RequestCycle cycle)
Description copied from interface: IRequestCycleListener
Called when the request cycle object is beginning its response

Specified by:
onBeginRequest in interface IRequestCycleListener

onEndRequest

public void onEndRequest(RequestCycle cycle)
Description copied from interface: IRequestCycleListener
Called when the request cycle object has finished its response

Specified by:
onEndRequest in interface IRequestCycleListener

onDetach

public void onDetach(RequestCycle cycle)
Description copied from interface: IRequestCycleListener
Called after the request cycle has been detached

Specified by:
onDetach in interface IRequestCycleListener

onRequestHandlerScheduled

public void onRequestHandlerScheduled(RequestCycle cycle,
                                      IRequestHandler handler)
Description copied from interface: IRequestCycleListener
Called when a IRequestHandler has been scheduled. Can be called multiple times during a request when new handlers get scheduled for processing.

Specified by:
onRequestHandlerScheduled in interface IRequestCycleListener
See Also:
RequestCycle.scheduleRequestHandlerAfterCurrent(IRequestHandler)

onRequestHandlerResolved

public void onRequestHandlerResolved(RequestCycle cycle,
                                     IRequestHandler handler)
Description copied from interface: IRequestCycleListener
Called when an IRequestHandler is resolved and will be executed.

Specified by:
onRequestHandlerResolved in interface IRequestCycleListener

onException

public IRequestHandler onException(RequestCycle cycle,
                                   java.lang.Exception ex)
Description copied from interface: IRequestCycleListener
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

Specified by:
onException in interface IRequestCycleListener
ex - the exception that was passed in to RequestCycle.handleException(Exception)
Returns:
request handler that will be executed or null if none. If a request handler is returned, it will override any configured exception mapper

onExceptionRequestHandlerResolved

public void onExceptionRequestHandlerResolved(RequestCycle cycle,
                                              IRequestHandler handler,
                                              java.lang.Exception exception)
Description copied from interface: IRequestCycleListener
Called when an IRequestHandler is resolved for an exception and will be executed.

Specified by:
onExceptionRequestHandlerResolved in interface IRequestCycleListener

onRequestHandlerExecuted

public void onRequestHandlerExecuted(RequestCycle cycle,
                                     IRequestHandler handler)
Description copied from interface: IRequestCycleListener
Called after an IRequestHandler has been executed. If the execution resulted in an exception this method will not be called for that particular IRequestHandler.

Specified by:
onRequestHandlerExecuted in interface IRequestCycleListener

onUrlMapped

public void onUrlMapped(RequestCycle cycle,
                        IRequestHandler handler,
                        Url url)
Description copied from interface: IRequestCycleListener
Called after a Url is generated for a IRequestHandler. This method can be used to modify generated urls, for example query parameters can be added.

Specified by:
onUrlMapped in interface IRequestCycleListener


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