Class AppControllerFilter

All Implemented Interfaces:
RequestAccess
Direct Known Subclasses:
DBConnectionFilter

public class AppControllerFilter extends HttpSupportFilter
Controller filters are similar to that of Servlet filters, but designed to wrap execution of controllers. They can be used for many tasks that need to trigger before and after execution of a controller, such as login in, logging, opening a DB connection, timing, etc.

Instances of filters are not thread safe. The same object will be reused across many threads at the same time. Create instance variables at your own peril.

Many use cases for controller filters:

  • catch all exceptions and respond with a canned error (page)
  • check if uses logged in, and redirect to a login page is not
, another is an authentication controller that will redirect to a login page if user not logged in.
Author:
igor on 6/26/17.
  • Constructor Details

    • AppControllerFilter

      public AppControllerFilter()