Exemple #1
0
 def on_sendable(self, event):
     """
     Called when the sender link has credit and messages can
     therefore be transferred.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_sendable', event)
Exemple #2
0
 def on_released(self, event):
     """
     Called when the remote peer releases an outgoing message. Note
     that this may be in response to either the RELEASE or MODIFIED
     state as defined by the AMQP specification.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_released', event)
Exemple #3
0
 def on_settled(self, event):
     """
     Called when the remote peer has settled the outgoing
     message. This is the point at which it shouod never be
     retransmitted.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_settled', event)
Exemple #4
0
 def on_message(self, event):
     """
     Called when a message is received. The message itself can be
     obtained as a property on the event. For the purpose of
     refering to this message in further actions (e.g. if
     explicitly accepting it, the ``delivery`` should be used, also
     obtainable via a property on the event.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_message', event)
Exemple #5
0
 def on_link_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_link_opened', event)
Exemple #6
0
 def on_accepted(self, event):
     """
     Called when the remote peer accepts an outgoing message.
     """
     if self.delegate != None:
         dispatch(self.delegate, 'on_accepted', event)
Exemple #7
0
 def on_session_closing(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_session_closing', event)
     elif self.peer_close_is_error:
         self.on_session_error(event)
Exemple #8
0
 def on_session_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_closed', event)
Exemple #9
0
 def on_link_closing(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closing', event)
     elif self.peer_close_is_error:
         self.on_link_error(event)
Exemple #10
0
 def on_transport_closed(self, event):
     if self.delegate != None and event.connection and self.is_local_open(
             event.connection):
         dispatch(self.delegate, 'on_disconnected', event)
Exemple #11
0
 def on_link_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_error', event)
     else:
         self.log_error(event.link, "link")
         event.connection.close()
Exemple #12
0
 def on_settled(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_settled', event)
Exemple #13
0
 def on_session_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_opening', event)
Exemple #14
0
 def on_session_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_error', event)
     else:
         self.log_error(event.session, "session")
         event.connection.close()
Exemple #15
0
 def on_link_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_error', event)
     else:
         self.log_error(event.link, "link")
         event.connection.close()
Exemple #16
0
 def on_connection_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_error', event)
     else:
         self.log_error(event.connection, "connection")
Exemple #17
0
 def on_session_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_opening', event)
Exemple #18
0
 def on_accepted(self, event):
     """
     Called when the remote peer accepts an outgoing message.
     """
     if self.delegate != None:
         dispatch(self.delegate, 'on_accepted', event)
Exemple #19
0
 def on_link_opening(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_link_opening', event)
Exemple #20
0
 def on_connection_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_error', event)
     else:
         self.log_error(event.connection, "connection")
Exemple #21
0
 def on_connection_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_closed', event)
Exemple #22
0
 def on_session_closing(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_session_closing', event)
     elif self.peer_close_is_error:
         self.on_session_error(event)
Exemple #23
0
 def on_connection_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_opening', event)
Exemple #24
0
 def on_session_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_closed', event)
Exemple #25
0
 def on_link_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_opening', event)
Exemple #26
0
 def on_link_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closed', event)
Exemple #27
0
 def on_session_error(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_error', event)
     else:
         self.log_error(event.session, "session")
         event.connection.close()
Exemple #28
0
 def on_link_closing(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closing', event)
     elif self.peer_close_is_error:
         self.on_link_error(event)
Exemple #29
0
 def on_connection_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_closed', event)
Exemple #30
0
 def on_transport_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_disconnected', event)
Exemple #31
0
 def on_link_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closed', event)
Exemple #32
0
 def on_rejected(self, event):
     """
     Called when the remote peer rejects an outgoing message.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_rejected', event)
Exemple #33
0
 def on_transport_closed(self, event):
     if self.delegate and event.connection and self.is_local_open(event.connection):
         dispatch(self.delegate, 'on_disconnected', event)
Exemple #34
0
 def on_settled(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_settled', event)
Exemple #35
0
 def on_rejected(self, event):
     """
     Called when the remote peer rejects an outgoing message.
     """
     if self.delegate:
         dispatch(self.delegate, 'on_rejected', event)
Exemple #36
0
 def on_session_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_session_opened', event)
Exemple #37
0
 def on_connection_opening(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_connection_opening', event)
Exemple #38
0
 def on_connection_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_connection_opened', event)