YAMI4 Python Library 2.0.0
Messaging Solution for Distributed Systems
Loading...
Searching...
No Matches
Public Member Functions | List of all members
yami.IncomingMessage Class Reference
Inheritance diagram for yami.IncomingMessage:

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)
 

Detailed Description

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.

Member Function Documentation

◆ close()

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.

◆ get_header()

def yami.IncomingMessage.get_header (   self)
Provides access to the message header.

◆ get_message_id()

def yami.IncomingMessage.get_message_id (   self)
Returns the message identifier.

◆ get_message_name()

def yami.IncomingMessage.get_message_name (   self)
Returns the message name.

◆ get_object_name()

def yami.IncomingMessage.get_object_name (   self)
Returns the destination object name.

◆ get_parameters()

def yami.IncomingMessage.get_parameters (   self)
Provides access to the message content.

◆ get_source()

def yami.IncomingMessage.get_source (   self)
Returns the source of this incoming message.

◆ reject()

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.

◆ reply()

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.

The documentation for this class was generated from the following file: