org.gcube.common.ghn.service.handlers
Class RequestHandler

java.lang.Object
  extended by org.gcube.common.ghn.service.handlers.AbstractHandler<RequestHandler>
      extended by org.gcube.common.ghn.service.handlers.RequestHandler
All Implemented Interfaces:
ApplicationHandler<RequestHandler>
Direct Known Subclasses:
ScopeHandler

public abstract class RequestHandler
extends AbstractHandler<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 Pipeline.forward(ApplicationEvent).

Author:
Fabio Simeoni
See Also:
RequestEvent, ResponseEvent, Pipeline

Constructor Summary
RequestHandler()
           
 
Method Summary
 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.
 
Methods inherited from class org.gcube.common.ghn.service.handlers.AbstractHandler
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestHandler

public RequestHandler()
Method Detail

start

public void start(ApplicationContext ctx)
Initialises the handler.

Parameters:
ctx - the servlet context of the managed app.

handleRequest

public void handleRequest(RequestEvent e)
Invoked when the container receives a request for a servlet of a managed app.

Parameters:
pipeline - the pipeline in which this handler is registered
e - the event

handleResponse

public void handleResponse(ResponseEvent e)
Invoked when a servlet of a managed app has produced a response to a request.

Parameters:
pipeline - the pipeline in which this handler is registered
e - the event

onEvent

public void onEvent(ApplicationEvent<RequestHandler> e)
Description copied from interface: ApplicationHandler
Processes a given event.

Parameters:
e - the event

stop

public void stop()
Terminates the handler.



Copyright © 2013. All Rights Reserved.