YAMI4 Python Library 2.0.0
Messaging Solution for Distributed Systems
|
Public Member Functions | |
def | __init__ (self, msg) |
def | __del__ (self) |
def | close (self) |
def | get_source (self) |
def | get_object_name (self) |
def | get_message_name (self) |
def | get_header (self) |
def | get_parameters (self) |
def | get_message_id (self) |
def | reply (self, content={}, priority=0) |
def | reject (self, reason="", priority=0) |
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.
def yami.IncomingMessage.close | ( | self | ) |
Deallocates internal resources associated with this object. This function is called automatically if the object is used as a context manager.
def yami.IncomingMessage.get_header | ( | self | ) |
Provides access to the message header.
def yami.IncomingMessage.get_message_id | ( | self | ) |
Returns the message identifier.
def yami.IncomingMessage.get_message_name | ( | self | ) |
Returns the message name.
def yami.IncomingMessage.get_object_name | ( | self | ) |
Returns the destination object name.
def yami.IncomingMessage.get_parameters | ( | self | ) |
Provides access to the message content.
def yami.IncomingMessage.get_source | ( | self | ) |
Returns the source of this incoming message.
def yami.IncomingMessage.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.
def yami.IncomingMessage.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.