Package org.apache.wicket.request
Class RequestHandlerExecutor
java.lang.Object
org.apache.wicket.request.RequestHandlerExecutor
Manages executions of
IRequestHandler
s.- Author:
- Matej Knopp, igor.vaynberg
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Exception to stop current request handler and execute a new one. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
detach()
Detaches all request handlersprotected abstract void
detach
(IRequestHandler handler) Allows the request handler to detachexecute
(IRequestHandler handler) Execute the given handler.Get the handler currently executed.next()
void
replaceAll
(IRequestHandler handler) Replaces all request handlers on the stack with the specified one and executes it.protected abstract void
respond
(IRequestHandler handler) Allows the request handler to respond to the requestvoid
schedule
(IRequestHandler handler) Schedules the handler after the current one
-
Constructor Details
-
RequestHandlerExecutor
public RequestHandlerExecutor()
-
-
Method Details
-
getActive
Get the handler currently executed.- Returns:
- active handler
-
execute
Execute the given handler.- Parameters:
handler
- handler to be executed- Returns:
- handler to be executed next
- Throws:
RequestHandlerExecutor.ReplaceHandlerException
- if another handler should replace the given handler for execution
-
respond
Allows the request handler to respond to the request- Parameters:
handler
-
-
schedule
Schedules the handler after the current one- Parameters:
handler
-
-
next
- Returns:
- scheduled request handler after the current one
-
replaceAll
Replaces all request handlers on the stack with the specified one and executes it. If there are any request handlers currently executing (this method is called from insideIRequestHandler.respond(IRequestCycle)
) the execution is interrupted via an exception.- Parameters:
handler
-
-
detach
Detaches all request handlers -
detach
Allows the request handler to detach- Parameters:
handler
-
-