Beispiel #1
0
    def inPingReq(self, job, reqCtxt):
        log.debug("XenBEEBrokerProtocolFactory::inPingReq for %s" % reqCtxt.client)
        self.clearXBEDaemon()
        self._hasPongs = False

        broker = CalanaBrokerDaemon.getInstance()
        self.__requestend = int(broker.opts.bid_timeout) + time.time()
        try:
            self.factory.sendPingRequest(reqCtxt)
            reqCtxt.pushEvent("AddPing")
            msg = message.PollResponse(self.client, "PongResponse")
            log.debug("========== Sendet %d pingRequest" % reqCtxt.ReqLen())
        except Exception, e:
            reqCtxt.pushEvent("EndReq")
            log.debug("inPingReq Failed: '%s'" % e )
            msg = message.Error(errcode.ILLEGAL_REQUEST, "No XbeDaemons connected. '%s'" % e)
Beispiel #2
0
 def certificateChecker(self, certificate):
     return CalanaBrokerDaemon.getInstance().userDatabase.check_x509(certificate)
Beispiel #3
0
 def setTimeout(self):
     broker = CalanaBrokerDaemon.getInstance()
     self.__requestend = int(broker.opts.bid_timeout) + time.time()