Package org.apache.wicket.request
Class RequestHandlerExecutor
- java.lang.Object
-
- org.apache.wicket.request.RequestHandlerExecutor
-
public abstract class RequestHandlerExecutor extends Object
Manages executions ofIRequestHandlers.- Author:
- Matej Knopp, igor.vaynberg
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRequestHandlerExecutor.ReplaceHandlerExceptionException to stop current request handler and execute a new one.
-
Constructor Summary
Constructors Constructor Description RequestHandlerExecutor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddetach()Detaches all request handlersprotected abstract voiddetach(IRequestHandler handler)Allows the request handler to detachIRequestHandlerexecute(IRequestHandler handler)Execute the given handler.IRequestHandlergetActive()Get the handler currently executed.IRequestHandlernext()voidreplaceAll(IRequestHandler handler)Replaces all request handlers on the stack with the specified one and executes it.protected abstract voidrespond(IRequestHandler handler)Allows the request handler to respond to the requestvoidschedule(IRequestHandler handler)Schedules the handler after the current one
-
-
-
Constructor Detail
-
RequestHandlerExecutor
public RequestHandlerExecutor()
-
-
Method Detail
-
getActive
public IRequestHandler getActive()
Get the handler currently executed.- Returns:
- active handler
-
execute
public IRequestHandler execute(IRequestHandler handler)
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
protected abstract void respond(IRequestHandler handler)
Allows the request handler to respond to the request- Parameters:
handler-
-
schedule
public void schedule(IRequestHandler handler)
Schedules the handler after the current one- Parameters:
handler-
-
next
public IRequestHandler next()
- Returns:
- scheduled request handler after the current one
-
replaceAll
public void replaceAll(IRequestHandler handler)
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
public void detach()
Detaches all request handlers
-
detach
protected abstract void detach(IRequestHandler handler)
Allows the request handler to detach- Parameters:
handler-
-
-