org.makumba.commons
Class ControllerHandler

java.lang.Object
  extended by org.makumba.commons.ControllerHandler
Direct Known Subclasses:
AJAXDataControllerHandler, AnalysisInitControllerHandler, AttributesControllerHandler, CharsetControllerHandler, DatabaseConnectionControllerHandler, DataToolsControllerHandler, ErrorControllerHandler, FilterConditionControllerHandler, MakumbaToolsControllerHandler, ResponseControllerHandler, SourceViewControllerHandler

public abstract class ControllerHandler
extends Object

This is an abstraction of the filter mechanism. It emulates the behaviour of a filter so that different handlers can be defined which perform specific operations, without having to create real filters.

Version:
$Id: ControllerHandler.java 4369 2009-12-31 16:10:21Z rosso_nero $
Author:
Manuel Gay

Constructor Summary
ControllerHandler()
           
 
Method Summary
 void afterBeforeFilter(ServletRequest request, ServletResponse response, FilterConfig conf)
          Performs an operation before the doFilterChain() method is called, but after all beforeFilter(ServletRequest, ServletResponse, FilterConfig, ServletObjects) methods of all controller handlers registered in ControllerFilter have been called
 void afterFilter(ServletRequest request, ServletResponse response, FilterConfig conf)
          Performs an operation after the doFilterChain() method is called
 boolean beforeFilter(ServletRequest request, ServletResponse response, FilterConfig conf, ServletObjects httpServletObjects)
          Performs an operation before the doFilterChain() method is called
 void finalize(ServletRequest request, ServletResponse response)
          Performs cleanup operations after the filter operation is executed
 boolean onError(ServletRequest request, ServletResponse response, Throwable e, FilterConfig conf)
          Performs an operation when an error occurs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerHandler

public ControllerHandler()
Method Detail

beforeFilter

public boolean beforeFilter(ServletRequest request,
                            ServletResponse response,
                            FilterConfig conf,
                            ServletObjects httpServletObjects)
                     throws Exception
Performs an operation before the doFilterChain() method is called

Returns:
true if the operation worked out successfully, false otherwise
Throws:
Exception

afterBeforeFilter

public void afterBeforeFilter(ServletRequest request,
                              ServletResponse response,
                              FilterConfig conf)
                       throws Exception
Performs an operation before the doFilterChain() method is called, but after all beforeFilter(ServletRequest, ServletResponse, FilterConfig, ServletObjects) methods of all controller handlers registered in ControllerFilter have been called

Throws:
Exception

afterFilter

public void afterFilter(ServletRequest request,
                        ServletResponse response,
                        FilterConfig conf)
Performs an operation after the doFilterChain() method is called


onError

public boolean onError(ServletRequest request,
                       ServletResponse response,
                       Throwable e,
                       FilterConfig conf)
Performs an operation when an error occurs

Returns:
true if this still is an error, false if it was handled

finalize

public void finalize(ServletRequest request,
                     ServletResponse response)
Performs cleanup operations after the filter operation is executed