Improve event handling to support 3rd party modules in any Java package

Change-Id: I7941bae7cc6d5c17098b6cc55bd45219b1664b48