Interface ControllerFilter

All Known Implementing Classes:
ControllerFilterAdapter

public interface ControllerFilter
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, loggin, 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.

Author:
Igor Polevoy
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called by framework after executing a controller
    void
    Called by framework before executing a controller
    void
    Called by framework in case there was an exception inside a controller
  • Method Details

    • before

      void before()
      Called by framework before executing a controller
    • after

      void after()
      Called by framework after executing a controller
    • onException

      void onException(Exception e)
      Called by framework in case there was an exception inside a controller
      Parameters:
      e - exception.