/**
  * Registers the specified listener with this provider so that it would receive notifications on
  * changes of its state or other properties such as its local address and display name.
  *
  * @param listener the listener to register.
  */
 public void addRegistrationStateChangeListener(RegistrationStateChangeListener listener) {
   synchronized (registrationStateListeners) {
     if (!registrationStateListeners.contains(listener)) registrationStateListeners.add(listener);
   }
 }