public abstract class RequestHandler extends AbstractHandler implements ApplicationHandler<RequestHandler>
Handler of RequestEvents and ResponseEvents.
The handler participates in a ApplicationPipeline of other handlers registered for notification of the same events.
After processing the event, it may or may not propagate the event to the handlers further down in the
ApplicationPipeline ApplicationPipeline#forward(ApplicationEvent).
RequestEvent,
ResponseEvent,
ApplicationPipeline| Constructor and Description |
|---|
RequestHandler() |
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getName() |
void |
handleRequest(RequestEvent e)
Invoked when the container receives a request for a servlet of a managed app.
|
void |
handleResponse(ResponseEvent e)
Invoked when a servlet of a managed app has produced a response to a request.
|
void |
onEvent(ApplicationEvent<RequestHandler> e)
Processes a given event.
|
void |
start(ApplicationContext ctx)
Initialises the handler.
|
void |
stop()
Terminates the handler.
|
equals, toStringpublic abstract String getName()
public void start(ApplicationContext ctx)
ctx - the servlet context of the managed app.public void handleRequest(RequestEvent e)
pipeline - the pipeline in which this handler is registerede - the eventpublic void handleResponse(ResponseEvent e)
pipeline - the pipeline in which this handler is registerede - the eventpublic void onEvent(ApplicationEvent<RequestHandler> e)
HandleronEvent in interface Handler<ApplicationEvent<RequestHandler>>public void stop()
Copyright © 2019. All Rights Reserved.