cli_proton_python.receiver module

Proton reactive API python reciever client

class cli_proton_python.receiver.Recv(opts, prefetch=None)[source]

Bases: cli_proton_python.coreclient.CoreClient

Proton reactive API python receiver client

implements various handler methods for reactor events triggered by proton.reactor

check_empty(event)[source]

checks whether there are messages to dispatch

Parameters:event (proton.Event) – reactor event
do_message_action(delivery)[source]

performs requested action on received message

Parameters:delivery (proton.Delivery) – delivery disposition
on_connection_opened(event)[source]

called when connection is opened

Parameters:event (proton.Event) – reactor event
on_delivery(event)[source]

called when a message is delivered

Parameters:event (proton.Event) – reactor event

called on link flow

Parameters:event (proton.Event) – reactor event

called when link is opened

Parameters:event (proton.Event) – reactor event
on_message(event)[source]

called when a message is received

Parameters:event (proton.Event) – reactor event
on_settled(event)[source]

called when the remote peer has settled the outgoing message this is the point at which it should never be retransmitted

Parameters:event (proton.Event) – reactor event
on_start(event)[source]

called when the event loop starts, creates a receiver for given url

Parameters:event (proton.Event) – reactor event

Prepare link options

Returns:list of link options
Return type:list
process_reply_to(event)[source]

sends received message to reply to address

Parameters:event (proton.Event) – reactor event
tear_down(event, settled=False)[source]

tears down and closes the connection

Parameters:
  • event (proton.Event) – reactor event
  • settled (bool) – indicates whether all messages has been explicitly settled
class cli_proton_python.receiver.Timeout(parent, event)[source]

Bases: object

Scheduler object for timeout control

on_timer_task(_)[source]

on_timer_task action handler

if it’s time to close, so no new messages arrived in time, close connection

class cli_proton_python.receiver.TxRecv(opts)[source]

Bases: cli_proton_python.receiver.Recv, proton.handlers.TransactionHandler

Proton reactive API python transactional receiver client

implements various handler methods for reactor events triggered by proton.reactor

is_empty(event)[source]

check if queue is empty

Parameters:event (proton.Event) – reactor event
Returns:True if the source is empty, False otherwise
Return type:bool
on_delivery(event)[source]

called when a message is delivered

Parameters:event (proton.Event) – reactor event
on_disconnected(_)[source]

called when the transaction is disconnected

on_message(event)[source]

called when a message is received

Parameters:event (proton.Event) – reactor event
on_start(event)[source]

called when the event loop starts, creates a transactional receiver for given url

Parameters:event (proton.Event) – reactor event
on_transaction_aborted(event)[source]

called when the transaction is aborted

Parameters:event (proton.Event) – reactor event
on_transaction_committed(event)[source]

called when the transaction is committed

Parameters:event (proton.Event) – reactor event
on_transaction_declared(event)[source]

called when the transaction is declared

Parameters:event (proton.Event) – reactor event
transaction_finish(event)[source]

finish transaction, do tranaction action, process reporting and control options

Parameters:event (proton.Event) – reactor event
transaction_process(event)[source]

transactionally receive a message, process reporting and control options

Parameters:event (proton.Event) – reactor event
cli_proton_python.receiver.main()[source]

main loop