A generic events dispatcher