'@param notifier: callback to call when the Broker connects.'

def notifyOnConnect(self, notifier):

    assert callable(notifier)
    if (self.connects is None):
        try:
            notifier()
        except:
            log.err()
    else:
        self.connects.append(notifier)
