public abstract class AbstractRequestCycleListener extends Object implements IRequestCycleListener
IRequestCycleListener useful as a starting point for your own
custom listener.| Constructor and Description |
|---|
AbstractRequestCycleListener() |
| Modifier and Type | Method and Description |
|---|---|
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, IRequestCycleListener.onEndRequest(RequestCycle) will still be called after
these listeners have IRequestCycleListener.onException(RequestCycle, Exception) called |
void |
onExceptionRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler,
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. |
public void onBeginRequest(RequestCycle cycle)
IRequestCycleListeneronBeginRequest in interface IRequestCycleListenerpublic void onEndRequest(RequestCycle cycle)
IRequestCycleListeneronEndRequest in interface IRequestCycleListenerpublic void onDetach(RequestCycle cycle)
IRequestCycleListeneronDetach in interface IRequestCycleListenerpublic void onRequestHandlerScheduled(RequestCycle cycle, IRequestHandler handler)
IRequestCycleListenerIRequestHandler has been scheduled. Can be called multiple times during
a request when new handlers get scheduled for processing.onRequestHandlerScheduled in interface IRequestCycleListenerRequestCycle.scheduleRequestHandlerAfterCurrent(IRequestHandler)public void onRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler)
IRequestCycleListenerIRequestHandler is resolved and will be executed.onRequestHandlerResolved in interface IRequestCycleListenerpublic IRequestHandler onException(RequestCycle cycle, Exception ex)
IRequestCycleListenerRequestCycle.handleException(Exception)
Note that in the event of an exception, IRequestCycleListener.onEndRequest(RequestCycle) will still be called after
these listeners have IRequestCycleListener.onException(RequestCycle, Exception) called
Important: Custom implementations are recommended to not try to
handle exceptions implementing IWicketInternalException interface.
Usually such kind of exceptions should be handled by the framework.
onException in interface IRequestCycleListenercycle - The current request cycleex - the exception that was passed in to
RequestCycle.handleException(Exception)null if none. If a request handler
is returned, it will override any configured
exception mapper.public void onExceptionRequestHandlerResolved(RequestCycle cycle, IRequestHandler handler, Exception exception)
IRequestCycleListenerIRequestHandler is resolved for an exception and will be executed.onExceptionRequestHandlerResolved in interface IRequestCycleListenerpublic void onRequestHandlerExecuted(RequestCycle cycle, IRequestHandler handler)
IRequestCycleListenerIRequestHandler has been executed. If the execution resulted in an
exception this method will not be called for that particular IRequestHandler.onRequestHandlerExecuted in interface IRequestCycleListenerpublic void onUrlMapped(RequestCycle cycle, IRequestHandler handler, Url url)
IRequestCycleListenerIRequestHandler. This method can be used to
modify generated urls, for example query parameters can be added.onUrlMapped in interface IRequestCycleListenerCopyright © 2006–2021 Apache Software Foundation. All rights reserved.