To register a listener, you need to call the addListener() method.
/**
* This method is used to register a listener with the service. The method
* should: 1. Check to see if there is a list of listener with the listener
* name, create one if the listener list doesn't exit 2. Add the new listener
* to the listener list
*
* @param listener
*/
public void addListener(Listener listener) {
...
}
By convention, we use the listener name as the name of the event to listen to.