|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.listener.ListenerCollection<IRequestCycleListener>
org.apache.wicket.request.cycle.RequestCycleListenerCollection
public class RequestCycleListenerCollection
Composite IRequestCycleListener that notifies all registered listeners with each
IRequestCycleListener event.
onBeginRequest(RequestCycle), #onRequestHandlerScheduled(IRequestHandler) and
#onRequestHandlerResolved(IRequestHandler) are notified in first in, first out order.
onEndRequest(RequestCycle) and onDetach(RequestCycle) are notified in last in
first out order (i.e. reversed order). So for these events the collection functions as a stack.
The RequestCycleListenerCollection will use the first exception handler that is returned
from all listeners in onException(RequestCycle, Exception)
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.apache.wicket.util.listener.ListenerCollection |
|---|
ListenerCollection.INotifier<T> |
| Constructor Summary | |
|---|---|
RequestCycleListenerCollection()
|
|
| Method Summary | |
|---|---|
void |
onBeginRequest(RequestCycle cycle)
Notifies all registered listeners of the onBeginRequest event in first in first out order, i.e. the listener that is the first element of this collection is the first listener to be notified of onBeginRequest. |
void |
onDetach(RequestCycle cycle)
Notifies all registered listeners of the onDetach event in first in last out order
(i.e. the last listener that received an #onBeginRequest will be the first to get
notified of an onDetach. |
void |
onEndRequest(RequestCycle cycle)
Notifies all registered listeners of the onEndRequest event in first in last out
order (i.e. the last listener that received an #onBeginRequest will be the first to
get notified of an onEndRequest. |
IRequestHandler |
onException(RequestCycle cycle,
Exception ex)
Notifies all registered listeners of the exception and calls the first handler that was returned by the listeners. |
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. |
| Methods inherited from class org.apache.wicket.util.listener.ListenerCollection |
|---|
add, isAllowingDuplicates, isAllowingNulls, iterator, notify, notifyIgnoringExceptions, remove, reversedNotify, reversedNotifyIgnoringExceptions |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RequestCycleListenerCollection()
| Method Detail |
|---|
public void onBeginRequest(RequestCycle cycle)
onBeginRequest.
onBeginRequest in interface IRequestCycleListenerpublic void onEndRequest(RequestCycle cycle)
onEndRequest event in first in last out
order (i.e. the last listener that received an #onBeginRequest will be the first to
get notified of an onEndRequest.
onEndRequest in interface IRequestCycleListenerIRequestCycleListener.onEndRequest(RequestCycle)public void onDetach(RequestCycle cycle)
onDetach event in first in last out order
(i.e. the last listener that received an #onBeginRequest will be the first to get
notified of an onDetach.
onDetach in interface IRequestCycleListenerIRequestCycleListener.onDetach(RequestCycle)
public IRequestHandler onException(RequestCycle cycle,
Exception ex)
onException in interface IRequestCycleListenerex - 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 mapperIRequestCycleListener.onException(RequestCycle, Exception)
public void onRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler)
IRequestCycleListenerIRequestHandler is resolved and will be executed.
onRequestHandlerResolved in interface IRequestCycleListener
public void onExceptionRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler,
Exception exception)
IRequestCycleListenerIRequestHandler is resolved for an exception and will be executed.
onExceptionRequestHandlerResolved in interface IRequestCycleListener
public 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 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 IRequestCycleListener
public 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 IRequestCycleListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||