Example #1
0
    def __init__(self):
        FilteringProtocol.__init__(self)
        
        # The list of clients is maintained as a stack because disconnections
        # automatically designate the next one in the list as the active. 
        # However, queries can be received from clients in any order. When a 
        # frontend recieves a query, it will call this instance back so that 
        # we know to send it the reply. 
        self.clientStack = []

        # The first set of authentication response messages (between the
        # AuthenticationOk/R and the ReadyForQuery/Z) are saved here. 
        self.authenticationResponse = []
Example #2
0
    def __init__(self):
        FilteringProtocol.__init__(self)

        # The list of clients is maintained as a stack because disconnections
        # automatically designate the next one in the list as the active.
        # However, queries can be received from clients in any order. When a
        # frontend recieves a query, it will call this instance back so that
        # we know to send it the reply.
        self.clientStack = []

        # The first set of authentication response messages (between the
        # AuthenticationOk/R and the ReadyForQuery/Z) are saved here.
        self.authenticationResponse = []
Example #3
0
 def messageReceived(self, msg):
     # tell the postgres protocol to mark this one as the active, 
     # because it will need to see the reply for this message. 
     self.postgresProtocol.activateClient(self)
     return FilteringProtocol.messageReceived(self, msg)
Example #4
0
 def __init__(self):
     FilteringProtocol.__init__(self)
     self.postgresProtocol = None
Example #5
0
 def messageReceived(self, msg):
     # tell the postgres protocol to mark this one as the active,
     # because it will need to see the reply for this message.
     self.postgresProtocol.activateClient(self)
     return FilteringProtocol.messageReceived(self, msg)
Example #6
0
 def __init__(self):
     FilteringProtocol.__init__(self)
     self.postgresProtocol = None