Add MessageListener to the constructor as an argument.