Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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)
Esempio n. 5
0
 def on_link_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_link_opened', event)
Esempio n. 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)
Esempio n. 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)
Esempio n. 8
0
 def on_session_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_closed', event)
Esempio n. 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)
Esempio n. 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)
Esempio n. 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()
Esempio n. 12
0
 def on_settled(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_settled', event)
Esempio n. 13
0
 def on_session_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_opening', event)
Esempio n. 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()
Esempio n. 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()
Esempio n. 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")
Esempio n. 17
0
 def on_session_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_opening', event)
Esempio n. 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)
Esempio n. 19
0
 def on_link_opening(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_link_opening', event)
Esempio n. 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")
Esempio n. 21
0
 def on_connection_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_closed', event)
Esempio n. 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)
Esempio n. 23
0
 def on_connection_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_opening', event)
Esempio n. 24
0
 def on_session_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_session_closed', event)
Esempio n. 25
0
 def on_link_opening(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_opening', event)
Esempio n. 26
0
 def on_link_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closed', event)
Esempio n. 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()
Esempio n. 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)
Esempio n. 29
0
 def on_connection_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_connection_closed', event)
Esempio n. 30
0
 def on_transport_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_disconnected', event)
Esempio n. 31
0
 def on_link_closed(self, event):
     if self.delegate:
         dispatch(self.delegate, 'on_link_closed', event)
Esempio n. 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)
Esempio n. 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)
Esempio n. 34
0
 def on_settled(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_settled', event)
Esempio n. 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)
Esempio n. 36
0
 def on_session_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_session_opened', event)
Esempio n. 37
0
 def on_connection_opening(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_connection_opening', event)
Esempio n. 38
0
 def on_connection_opened(self, event):
     if self.delegate != None:
         dispatch(self.delegate, 'on_connection_opened', event)