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