Class RequestCycleListenerCollection

java.lang.Object
org.apache.wicket.util.listener.ListenerCollection<IRequestCycleListener>
org.apache.wicket.request.cycle.RequestCycleListenerCollection
All Implemented Interfaces:
Serializable, Iterable<IRequestCycleListener>, IRequestCycleListener

public class RequestCycleListenerCollection extends org.apache.wicket.util.listener.ListenerCollection<IRequestCycleListener> implements IRequestCycleListener
Composite IRequestCycleListener that notifies all registered listeners with each IRequestCycleListener event.

Order of notification onBeginRequest(RequestCycle), onRequestHandlerScheduled(RequestCycle, IRequestHandler) and onRequestHandlerResolved(RequestCycle, 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.

Exception handling The RequestCycleListenerCollection will use the first exception handler that is returned from all listeners in onException(RequestCycle, Exception)

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.wicket.util.listener.ListenerCollection

    org.apache.wicket.util.listener.ListenerCollection.INotifier<T extends Object>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Notifies all registered listeners of the onBeginRequest event in first in first out order, i.e.
    void
    Notifies all registered listeners of the onDetach event in first in last out order (i.e.
    void
    Notifies all registered listeners of the onEndRequest event in first in last out order (i.e.
    org.apache.wicket.request.IRequestHandler
    Notifies all registered listeners of the exception and calls the first handler that was returned by the listeners.
    void
    onExceptionRequestHandlerResolved(RequestCycle cycle, org.apache.wicket.request.IRequestHandler handler, Exception exception)
    Called when an IRequestHandler is resolved for an exception and will be executed.
    void
    onRequestHandlerExecuted(RequestCycle cycle, org.apache.wicket.request.IRequestHandler handler)
    Called after an IRequestHandler has been executed.
    void
    onRequestHandlerResolved(RequestCycle cycle, org.apache.wicket.request.IRequestHandler handler)
    Called when an IRequestHandler is resolved and will be executed.
    void
    onRequestHandlerScheduled(RequestCycle cycle, org.apache.wicket.request.IRequestHandler handler)
    Called when a IRequestHandler has been scheduled.
    void
    onUrlMapped(RequestCycle cycle, org.apache.wicket.request.IRequestHandler handler, org.apache.wicket.request.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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator