Add message handler interface

Signed-off-by: Ladislav Klenovic <klenovic@nerdrobot.net>