Package qpid :: Module api :: Class Receiver
[frames] | no frames]

Class Receiver

object --+    
         |    
  Lockable --+
             |
            Receiver

Receives incoming messages from a remote source. Messages may be actively fetched with fetch or a listener may be installed with listen.

Instance Methods
 
__init__(self, session, index, source, started)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
listen(self, *args, **kwargs)
Sets the message listener for this receiver.
 
fetch(self, *args, **kwargs)
Fetch and return a single message.
 
start(self, *args, **kwargs)
Start incoming message delivery for this receiver.
 
stop(self, *args, **kwargs)
Stop incoming message delivery for this receiver.
 
close(self, *args, **kwargs)
Close the receiver.

Inherited from Lockable: lock, notify, notifyAll, unlock, wait

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

Properties

Inherited from object: __class__

Method Details

__init__(self, session, index, source, started)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

listen(self, *args, **kwargs)

 

Sets the message listener for this receiver.

Parameters:
  • listener (callable) - a callable object to be notified on message arrival
Decorators:
  • @synchronized

fetch(self, *args, **kwargs)

 

Fetch and return a single message. A timeout of None will block forever waiting for a message to arrive, a timeout of zero will return immediately if no messages are available.

Parameters:
  • timeout (float) - the time to wait for a message to be available
Decorators:
  • @synchronized

start(self, *args, **kwargs)

 

Start incoming message delivery for this receiver.

Decorators:
  • @synchronized

stop(self, *args, **kwargs)

 

Stop incoming message delivery for this receiver.

Decorators:
  • @synchronized

close(self, *args, **kwargs)

 

Close the receiver.

Decorators:
  • @synchronized