def _serviceConnector(self, connector): conn = proton.pn_connector_connection(connector) self._initConnection(conn) self._openPendingSessions(conn, connector) self._openLinks(conn) self._queueOutgoingDeliveries(conn) self._processDeliveries(conn, connector) self._cleanDeliveries(conn) self._cleanLinks(conn) self._cleanSessions(conn) if proton.pn_connection_state(conn) == (proton.PN_LOCAL_ACTIVE | proton.PN_REMOTE_CLOSED): self.log.debug("Connection Closed") proton.pn_connection_close(conn)
def _teardownConnection(self, conn): if proton.pn_connection_state(conn) == ((proton.PN_LOCAL_ACTIVE | proton.PN_REMOTE_CLOSED)): proton.pn_connection_close(conn)
def _initConnection(self, conn): if proton.pn_connection_state(conn) & proton.PN_LOCAL_UNINIT: self.log.debug("Connection Opened.") proton.pn_connection_open(conn)