code: def getPort(self):
          
          disp = self.pbmanager.dispatchers[self.portstr]
          return disp.port.getHost().port
docs: Helper method for testing; returns the TCP port used for this
          registration, even if it was specified as 0 and thus allocated by the
          OS.