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

Class SyncRequestResponse

source code


Implementation of the synchronous request-responce (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
 
reply_to(self)
Return the dynamic address of our receiver.
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 Handler: on_unhandled

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

Class Variables
  correlation_id = AtomicCount()

Inherited from Handler: handlers

Instance Variables
  address
Address for all requests, may be None.
  connection
Connection for requests and responses.
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. Sucessive 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:

reply_to(self)

source code 

Return the dynamic address of our receiver.

Decorators:
  • @property

on_message(self, event)

source code 

Called when we receive a message for our receiver.

Overrides: handlers.IncomingMessageHandler.on_message