Package proton :: Module _utils :: Class SyncRequestResponse
[frames] | no frames]

type SyncRequestResponse

source code


Implementation of the synchronous request-response (aka RPC) pattern.

Instance Methods
 
__init__(self, connection, address=None)
Send requests and receive responses.
source code
 
call(self, request)
Send a request message, wait for and return the response message.
source code
 
on_message(self, event)
Called when we receive a message for our receiver.
source code

Inherited from _handlers.IncomingMessageHandler: on_aborted, on_delivery, on_settled

Inherited from _events.Handler: add, handlers, on_unhandled

Inherited from _handlers.Acking: accept, reject, release, settle

Class Variables
  correlation_id = AtomicCount()
Instance Variables
  address
Address for all requests, may be None.
  connection
Connection for requests and responses.
Properties
  reply_to
Return the dynamic address of our receiver.
Method Details

__init__(self, connection, address=None)
(Constructor)

source code 

Send requests and receive responses. A single instance can send many requests to the same or different addresses.

Parameters:
  • connection - A BlockingConnection
  • address - Address for all requests. If not specified, each request must have the address property set. Successive messages may have different addresses.
Overrides: _handlers.IncomingMessageHandler.__init__

call(self, request)

source code 

Send a request message, wait for and return the response message.

Parameters:

on_message(self, event)

source code 

Called when we receive a message for our receiver.

Overrides: _handlers.IncomingMessageHandler.on_message

Property Details

reply_to

Return the dynamic address of our receiver.