示例#1
0
    def _processConnectors(self):
        connector = proton.pn_driver_connector(self._driver)
        while connector:
            self.log.debug("Process Connector")

            # releaes any connector that has been closed
            if proton.pn_connector_closed(connector):
                self.log.debug("Closing connector")
                proton.pn_connector_free(connector)
            else:
                proton.pn_connector_process(connector)

                state = proton.pn_connector_context(connector)
                if state == AUTHENTICATING:
                    self._authenticateConnector(connector)
                elif state == CONNECTED:
                    self._serviceConnector(connector)
                else:
                    self.log.warning("Unknown Connection state '%s'" % state)

                proton.pn_connector_process(connector)

            connector = proton.pn_driver_connector(self._driver)
示例#2
0
    def _processConnectors(self):
        connector = proton.pn_connector_head(self._driver)
        while connector:
            # releaes any connector that has been closed
            if proton.pn_connector_closed(connector):
                self.log.debug("Closing connector")
                proton.pn_connector_free(connector)
            else:
                proton.pn_connector_process(connector)

                state = proton.pn_connector_context(connector)
                if state == SERVER_AUTH:
                    self._authenticateConnector(connector)
                elif state == CONNECTED:
                    self._serviceConnector(connector)
                # Client authentication is handeled in a coroutine
                elif state == CLIENT_AUTH:
                    pass
                else:
                    self.log.warning("Unknown Connection state '%s'" % state)

                proton.pn_connector_process(connector)

            connector = proton.pn_connector_next(connector)
示例#3
0
    def _processConnectors(self):
        connector = proton.pn_connector_head(self._driver)
        while connector:
            # releaes any connector that has been closed
            if proton.pn_connector_closed(connector):
                self.log.debug("Closing connector")
                proton.pn_connector_free(connector)
            else:
                proton.pn_connector_process(connector)

                state = proton.pn_connector_context(connector)
                if state == SERVER_AUTH:
                    self._authenticateConnector(connector)
                elif state == CONNECTED:
                    self._serviceConnector(connector)
                # Client authentication is handeled in a coroutine
                elif state == CLIENT_AUTH:
                    pass
                else:
                    self.log.warning("Unknown Connection state '%s'" % state)

                proton.pn_connector_process(connector)

            connector = proton.pn_connector_next(connector)
示例#4
0
 def closed(self):
     return (self.connector is None or
             proton.pn_connector_closed(self.connector))
示例#5
0
 def closed(self):
     return (self.connector is None
             or proton.pn_connector_closed(self.connector))