public abstract class RequestHandlerExecutor extends Object
IRequestHandler
s.Modifier and Type | Class and Description |
---|---|
static class |
RequestHandlerExecutor.ReplaceHandlerException
Exception to stop current request handler and execute a new one.
|
Constructor and Description |
---|
RequestHandlerExecutor() |
Modifier and Type | Method and Description |
---|---|
void |
detach()
Detaches all request handlers
|
protected abstract void |
detach(IRequestHandler handler)
Allows the request handler to detach
|
IRequestHandler |
execute(IRequestHandler handler)
Execute the given handler.
|
IRequestHandler |
getActive()
Get the handler currently executed.
|
IRequestHandler |
next() |
void |
replaceAll(IRequestHandler handler)
Replaces all request handlers on the stack with the specified one and executes it.
|
IRequestHandler |
resolveHandler(RuntimeException exception)
Deprecated.
|
protected abstract void |
respond(IRequestHandler handler)
Allows the request handler to respond to the request
|
void |
schedule(IRequestHandler handler)
Schedules the handler after the current one
|
public IRequestHandler getActive()
public IRequestHandler execute(IRequestHandler handler)
handler
- handler to be executedRequestHandlerExecutor.ReplaceHandlerException
- if another handler should replace the given handler for executionpublic final IRequestHandler resolveHandler(RuntimeException exception)
exception
- protected abstract void respond(IRequestHandler handler)
handler
- public void schedule(IRequestHandler handler)
handler
- public IRequestHandler next()
public void replaceAll(IRequestHandler handler)
IRequestHandler.respond(IRequestCycle)
) the execution is interrupted via an
exception.handler
- public void detach()
protected abstract void detach(IRequestHandler handler)
handler
- Copyright © 2006–2022 Apache Software Foundation. All rights reserved.