Class RequestHandler
java.lang.Object
org.gcube.smartgears.handlers.AbstractHandler
org.gcube.smartgears.handlers.application.RequestHandler
- All Implemented Interfaces:
ApplicationHandler<RequestHandler>,Handler<ApplicationEvent<RequestHandler>>
- Direct Known Subclasses:
RequestAccounting,RequestIdHandler,RequestMetrics,RequestValidator
public abstract class RequestHandler
extends AbstractHandler
implements ApplicationHandler<RequestHandler>
A
Handler of RequestEvents and ResponseEvents.
The handler participates in a pipeline 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 pipeline.
- Author:
- Fabio Simeoni, Luca Frosini (ISTI-CNR)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringgetName()voidInvoked when the container receives a request for a servlet of a managed app.voidInvoked when a servlet of a managed app has produced a response to a request.booleanvoidProcesses a given event.voidstart(ApplicationContext ctx) Initialises the handler.voidstop()Terminates the handler.Methods inherited from class org.gcube.smartgears.handlers.AbstractHandler
equals, toString
-
Constructor Details
-
RequestHandler
public RequestHandler()
-
-
Method Details
-
getName
-
isUnfiltrable
public boolean isUnfiltrable() -
start
Initialises the handler.- Parameters:
ctx- the servlet context of the managed app.
-
handleRequest
Invoked when the container receives a request for a servlet of a managed app.- Parameters:
e- the request event
-
handleResponse
Invoked when a servlet of a managed app has produced a response to a request.- Parameters:
e- the response event
-
onEvent
Description copied from interface:HandlerProcesses a given event.- Specified by:
onEventin interfaceHandler<ApplicationEvent<RequestHandler>>- Parameters:
e- the event to process
-
stop
public void stop()Terminates the handler.
-