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

Class SyncRequestResponse

source code

                 object --+        
                          |        
                    Handler --+    
                              |    
                 object --+   |    
                          |   |    
            handlers.Acking --+    
                              |    
handlers.IncomingMessageHandler --+
                                  |
                                 SyncRequestResponse

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
 
on_message(self, event)
Called when we receive a message for our receiver.
source code

Inherited from handlers.IncomingMessageHandler: on_delivery, on_settled

Inherited from Handler: on_unhandled

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

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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.

Inherited from object: __class__

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: object.__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.

Get Method:
unreachable.reply_to(self) - Return the dynamic address of our receiver.