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

Class Session

object --+    
         |    
  Lockable --+
             |
            Session

Sessions provide a linear context for sending and receiving messages, and manage various Senders and Receivers.

Instance Methods
 
__init__(self, connection, name, started)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Sender
sender(self, *args, **kwargs)
Creates a Sender that may be used to send Messages to the specified target.
Receiver
receiver(self, *args, **kwargs)
Creates a receiver that may be used to actively fetch or to listen for the arrival of Messages from the specified source.
 
acknowledge(self, *args, **kwargs)
Acknowledge the given Message.
 
start(self, *args, **kwargs)
Start incoming message delivery for the session.
 
stop(self, *args, **kwargs)
Stop incoming message delivery for the session.
 
run(self, *args, **kwargs)
 
close(self, *args, **kwargs)
Close the session.

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, connection, name, started)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

sender(self, *args, **kwargs)

 

Creates a Sender that may be used to send Messages to the specified target.

Parameters:
  • target (str) - the target to which messages will be sent
Returns: Sender
a new Sender for the specified target
Decorators:
  • @synchronized

receiver(self, *args, **kwargs)

 

Creates a receiver that may be used to actively fetch or to listen for the arrival of Messages from the specified source.

Parameters:
Returns: Receiver
a new Receiver for the specified source
Decorators:
  • @synchronized

acknowledge(self, *args, **kwargs)

 

Acknowledge the given Message. If message is None, then all unackednowledged messages on the session are acknowledged.

Parameters:
  • message (Message) - the message to acknowledge or None
Decorators:
  • @synchronized

start(self, *args, **kwargs)

 

Start incoming message delivery for the session.

Decorators:
  • @synchronized

stop(self, *args, **kwargs)

 

Stop incoming message delivery for the session.

Decorators:
  • @synchronized

run(self, *args, **kwargs)

 
Decorators:
  • @synchronized

close(self, *args, **kwargs)

 

Close the session.

Decorators:
  • @synchronized