Basic framework for class which registers listener and its callback method