code: def on_service_arrival(self, svc_ref):
          
          with self._lock:
              new_ranking = svc_ref.get_property(SERVICE_RANKING)
              if self._current_ranking is not None:
                  if new_ranking > self._current_ranking:
                      # New service with better ranking: use it
                      self._pending_ref = svc_ref
                      old_ref = self.reference
                      old_value = self._value
  
                      # Clean up like for a departure
                      self._current_ranking = None
                      self._value = None
                      self.reference = None
  
                      # Unbind (new binding will be done afterwards)
                      self._ipopo_instance.unbind(self, old_value, old_ref)
              else:
                  # No ranking yet: inject the service
                  self.reference = svc_ref
                  self._value = self._context.get_service(svc_ref)
                  self._current_ranking = new_ranking
                  self._pending_ref = None
  
                  self._ipopo_instance.bind(self, self._value, self.reference)
docs: Called when a service has been registered in the framework
  
          :param svc_ref: A service reference