Extracting SingleMessageListener class