Abstract class for encapsulating monitor based handlers.