|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.request.cycle.AbstractRequestCycleListener
org.apache.wicket.request.cycle.PageRequestHandlerTracker
public class PageRequestHandlerTracker
Registers and retrieves first and last IPageRequestHandler in a request cycle. Can be used to find out what is the requested page and what is the actual response page.
To use it an application needs to register it with:
application.getRequestCycleListeners().add(new PageRequestHandlerTracker());
| Field Summary | |
|---|---|
static MetaDataKey<IPageRequestHandler> |
FIRST_HANDLER_KEY
The key for the first handler |
static MetaDataKey<IPageRequestHandler> |
LAST_HANDLER_KEY
The key for the last handler |
| Constructor Summary | |
|---|---|
PageRequestHandlerTracker()
|
|
| Method Summary | |
|---|---|
static IPageRequestHandler |
getFirstHandler(RequestCycle cycle)
retrieves first handler from the request cycle |
static IPageRequestHandler |
getLastHandler(RequestCycle cycle)
retrieves last handler from requestcycle |
void |
onExceptionRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler,
Exception exception)
Called when an IRequestHandler is resolved for an exception and will be 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. |
| Methods inherited from class org.apache.wicket.request.cycle.AbstractRequestCycleListener |
|---|
onBeginRequest, onDetach, onEndRequest, onException, onRequestHandlerExecuted, onUrlMapped |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final MetaDataKey<IPageRequestHandler> FIRST_HANDLER_KEY
public static final MetaDataKey<IPageRequestHandler> LAST_HANDLER_KEY
| Constructor Detail |
|---|
public PageRequestHandlerTracker()
| Method Detail |
|---|
public void onRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler)
IRequestCycleListenerIRequestHandler is resolved and will be executed.
onRequestHandlerResolved in interface IRequestCycleListeneronRequestHandlerResolved in class AbstractRequestCycleListener
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 IRequestCycleListeneronRequestHandlerScheduled in class AbstractRequestCycleListenerRequestCycle.scheduleRequestHandlerAfterCurrent(IRequestHandler)
public void onExceptionRequestHandlerResolved(RequestCycle cycle,
IRequestHandler handler,
Exception exception)
IRequestCycleListenerIRequestHandler is resolved for an exception and will be executed.
onExceptionRequestHandlerResolved in interface IRequestCycleListeneronExceptionRequestHandlerResolved in class AbstractRequestCycleListenerpublic static IPageRequestHandler getLastHandler(RequestCycle cycle)
cycle -
public static IPageRequestHandler getFirstHandler(RequestCycle cycle)
cycle -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||