Module yami :: Class IncomingMessage
[frames] | no frames]

Class IncomingMessage

object --+
         |
        IncomingMessage

Incoming message.

The handler allowing to inspect the details of the incoming message and sent back replies or rejection notifications.

The user code interacts with objects of this type mainly in the functors that are provided during object registration and that are later called back when the incoming message arrives. The handler objects can be stored aside for further processing even after the callback returns, but should not be kept alive longer than the agent itself.

Note: The objects of this class are not supposed to be used from multiple threads.

Instance Methods
 
__init__(self, msg)
x.__init__(...) initializes x; see help(type(x)) for signature
 
__del__(self)
 
close(self)
Deallocates internal resources associated with this object.
 
get_source(self)
Returns the source of this incoming message.
 
get_object_name(self)
Returns the destination object name.
 
get_message_name(self)
Returns the message name.
 
get_parameters(self)
Provides access to the message content.
 
reply(self, content={}, priority=0)
Sends back the reply.
 
reject(self, reason="", priority=0)
Sends back the rejection (exception) notification.

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

Properties

Inherited from object: __class__

Method Details

__init__(self, msg)
(Constructor)

 

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

Overrides: object.__init__
(inherited documentation)

close(self)

 

Deallocates internal resources associated with this object.

This function is called automatically if the object is used as a context manager.

reply(self, content={}, priority=0)

 

Sends back the reply.

Sends back the reply to the message identified by this object. The reply (or rejection) can be sent only once.

reject(self, reason="", priority=0)

 

Sends back the rejection (exception) notification.

Sends back the rejection to the message identified by this object. The rejection (or reply) can be sent only once.