Package gofer :: Package rmi :: Module async :: Class ReplyConsumer
[hide private]
[frames] | no frames]

Class ReplyConsumer

source code

messaging.endpoint.Endpoint --+    
                              |    
    messaging.consumer.Consumer --+
                                  |
                                 ReplyConsumer

A request, reply consumer.

Instance Methods [hide private]
 
start(self, listener, watchdog=None)
Start processing messages on the queue and forward to the listener.
source code
 
dispatch(self, envelope)
Dispatch received request.
source code

Inherited from messaging.consumer.Consumer: __init__, address, close, id, join, received, stop, valid

Inherited from messaging.endpoint.Endpoint: __del__, __str__, ack, open, session

Inherited from messaging.endpoint.Endpoint (private): _lock, _unlock

Class Methods [hide private]

Inherited from messaging.consumer.Consumer: subject

Class Variables [hide private]

Inherited from messaging.endpoint.Endpoint: LOCALHOST, ssnpool

Instance Variables [hide private]
set blacklist
A set of serial numbers to ignore.
any listener
An reply listener.
WatchDog watchdog
An (optional) watchdog.

Inherited from messaging.endpoint.Endpoint: url, uuid

Method Details [hide private]

start(self, listener, watchdog=None)

source code 

Start processing messages on the queue and forward to the listener.

Parameters:
  • listener (Listener) - A reply listener.
  • watchdog (WatchDog) - An (optional) watchdog.
Overrides: messaging.consumer.Consumer.start

dispatch(self, envelope)

source code 

Dispatch received request. The serial number of failed requests is added to the blacklist help prevent dispatching both failure and success replies. The primary cause of this is when the watchdog has replied on the agent's behalf but the agent actually completes the request and later sends a reply.

Parameters:
  • envelope (Envelope) - The received envelope.
Overrides: messaging.consumer.Consumer.dispatch