|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.request.RequestHandlerStack
public abstract class RequestHandlerStack
Manages stack of IRequestHandler
s.
Nested Class Summary | |
---|---|
static class |
RequestHandlerStack.ReplaceHandlerException
Exception to stop current request handler and execute a new one. |
Constructor Summary | |
---|---|
RequestHandlerStack(Response response)
Construct. |
Method Summary | |
---|---|
void |
detach()
Detaches all IRequestHandler s. |
void |
executeRequestHandler(IRequestHandler handler)
Executes the specified IRequestHandler . |
IRequestHandler |
getActiveRequestHandler()
Returns currently active IRequestHandler . |
protected abstract IRequestCycle |
getRequestCycle()
|
IRequestHandler |
getRequestHandlerScheduledAfterCurrent()
Returns the request handler scheduled after current request handler. |
Response |
getResponse()
Returns the active Response . |
void |
replaceAllRequestHandlers(IRequestHandler handler)
Removes the whole IRequestHandler stack, terminates currently running
IRequestHandler and executes the new IRequestHandler . |
void |
replaceCurrentRequestHandler(IRequestHandler handler)
Replaces the currently executed IRequestHandler with new IRequestHandler . |
void |
scheduleRequestHandlerAfterCurrent(IRequestHandler handler)
Schedules the request handler to be executed after current request handler finishes. |
Response |
setResponse(Response response)
Replaces current Response with new Response instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RequestHandlerStack(Response response)
response
- Method Detail |
---|
protected abstract IRequestCycle getRequestCycle()
public IRequestHandler getActiveRequestHandler()
IRequestHandler
.
null
if no handler is active.public void executeRequestHandler(IRequestHandler handler)
IRequestHandler
. When the specified IRequestHandler
finishes, the IRequestHandler
that invoked this method continues (unless the new
IRequestHandler
called replaceAllRequestHandlers(IRequestHandler)
.
handler
- public void scheduleRequestHandlerAfterCurrent(IRequestHandler handler)
replaceCurrentRequestHandler(IRequestHandler)
or
replaceAllRequestHandlers(IRequestHandler)
is invoked during current request handler
execution the scheduled handler will be also discarded.
handler
- handler to be executed after current request handler finishespublic IRequestHandler getRequestHandlerScheduledAfterCurrent()
null
scheduleRequestHandlerAfterCurrent(IRequestHandler)
public void replaceCurrentRequestHandler(IRequestHandler handler)
IRequestHandler
with new IRequestHandler
. The
currently executed IRequestHandler
is terminated and the new IRequestHandler
is executed.
handler
- public void replaceAllRequestHandlers(IRequestHandler handler)
IRequestHandler
stack, terminates currently running
IRequestHandler
and executes the new IRequestHandler
.
handler
- public Response getResponse()
Response
.
public Response setResponse(Response response)
Response
with new Response
instance. The original response
is always restored after the IRequestHandler#respond(RequestCycle)
method is
finished.
response
-
public void detach()
IRequestHandler
s.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |