Package gofer :: Package messaging :: Module consumer :: Class ReceiverThread
[hide private]
[frames] | no frames]

Class ReceiverThread

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        ReceiverThread

Message consumer thread.

Instance Methods [hide private]
 
__init__(self, consumer)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
run(self)
Thread main().
source code
 
stop(self)
Stop the thread.
source code
Receiver
__open(self)
Open the AMQP receiver.
source code
 
__fetch(self, receiver)
Fetch the next available message.
source code

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

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

Class Variables [hide private]
int WAIT = 3
How long (seconds) to wait for messages.
Instance Variables [hide private]
Consumer __consumer
The (target) consumer.
bool __run
The main run latch.
Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self, consumer)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Parameters:
  • consumer (Consumer) - The (target) consumer that is notified when messages are fetched.
Overrides: object.__init__

run(self)

source code 

Thread main(). Consumer messages and forward to the (target) consumer.

Overrides: threading.Thread.run

__open(self)

source code 

Open the AMQP receiver.

Returns: Receiver
The opened receiver.

__fetch(self, receiver)

source code 

Fetch the next available message.

Parameters:
  • receiver (Receiver) - An AMQP receiver.