Package qpid :: Package messaging :: Module endpoints :: Class Receiver
[frames] | no frames]

type Receiver

source code


Receives incoming messages from a remote source. Messages may be fetched with fetch.

Instance Methods
 
__init__(self, session, id, source, options) source code
 
check_error(self) source code
 
get_error(self) source code
 
check_closed(self) source code
 
unsettled(self)
Returns the number of acknowledged messages awaiting confirmation.
source code
int
available(self)
Returns the number of messages available to be fetched by the application.
source code
 
fetch(self, timeout=None)
Fetch and return a single message.
source code
 
close(self, timeout=None)
Close the receiver.
source code

Inherited from Endpoint: set_async_exception_notify_handler

Properties
  capacity
Method Details

__init__(self, session, id, source, options)
(Constructor)

source code 
Overrides: Endpoint.__init__

unsettled(self)

source code 

Returns the number of acknowledged messages awaiting confirmation.

Decorators:
  • @synchronized

available(self)

source code 

Returns the number of messages available to be fetched by the application.

Returns: int
the number of available messages
Decorators:
  • @synchronized

fetch(self, timeout=None)

source code 

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

close(self, timeout=None)

source code 

Close the receiver.

Decorators:
  • @synchronized

Property Details

capacity

Get Method:
_get_capacity(self)
Set Method:
_set_capacity(self, c, wakeup=True)