Added support for handling events based on interfaces.