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

Class Sender

source code


Sends outgoing messages.

Instance Methods
 
__init__(self, session, id, target, options) source code
 
check_error(self) source code
 
get_error(self) source code
 
check_closed(self) source code
int
unsettled(self)
Returns the number of messages awaiting acknowledgment.
source code
 
available(self) source code
 
send(self, object, sync=True, timeout=None)
Send a message.
source code
 
sync(self, timeout=None) source code
 
close(self, timeout=None)
Close the Sender.
source code
Method Details

unsettled(self)

source code 

Returns the number of messages awaiting acknowledgment.

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

available(self)

source code 
Decorators:
  • @synchronized

send(self, object, sync=True, timeout=None)

source code 

Send a message. If the object passed in is of type unicode, str, list, or dict, it will automatically be wrapped in a Message and sent. If it is of type Message, it will be sent directly. If the sender capacity is not UNLIMITED then send will block until there is available capacity to send the message. If the timeout parameter is specified, then send will throw an InsufficientCapacity exception if capacity does not become available within the specified time.

Parameters:
  • object (unicode, str, list, dict, Message) - the message or content to send
  • sync (boolean) - if true then block until the message is sent
  • timeout (float) - the time to wait for available capacity
Decorators:
  • @synchronized

sync(self, timeout=None)

source code 
Decorators:
  • @synchronized

close(self, timeout=None)

source code 

Close the Sender.

Decorators:
  • @synchronized