Example #1
0
    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)
Example #2
0
    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)
Example #3
0
 def _teardownConnection(self, conn):
     if proton.pn_connection_state(conn) == ((proton.PN_LOCAL_ACTIVE |
                                              proton.PN_REMOTE_CLOSED)):
         proton.pn_connection_close(conn)
Example #4
0
 def _initConnection(self, conn):
     if proton.pn_connection_state(conn) & proton.PN_LOCAL_UNINIT:
         self.log.debug("Connection Opened.")
         proton.pn_connection_open(conn)
Example #5
0
 def _teardownConnection(self, conn):
     if proton.pn_connection_state(conn) == ((proton.PN_LOCAL_ACTIVE
                                              | proton.PN_REMOTE_CLOSED)):
         proton.pn_connection_close(conn)
Example #6
0
 def _initConnection(self, conn):
     if proton.pn_connection_state(conn) & proton.PN_LOCAL_UNINIT:
         self.log.debug("Connection Opened.")
         proton.pn_connection_open(conn)