package YAMI.Incoming_Messages

Public [types] [subprograms]

Types

Incoming_Message

   type Incoming_Message is tagged limited private;
   type Incoming_Message_Access is access all Incoming_Message;

Type encapsulating all information about the incoming message.

Message_Handler

   type Message_Handler is limited interface;
   type Message_Handler_Access is access all Message_Handler'Class;

Callback interface for processing incoming messages.


Subprograms

Source

   function Source (Msg : in Incoming_Message) return String;

Gets the message source name.

Object_Name

   function Object_Name (Msg : in Incoming_Message) return String;

Gets the destination object name.

Message_Name

   function Message_Name (Msg : in Incoming_Message) return String;

Gets the message name.

Process_Content

   procedure Process_Content
     (Msg : in Incoming_Message;
      Process : not null access procedure
      (Content : in out Parameters.Parameters_Collection));

Queries the body content.

Process_Raw_Content

   procedure Process_Raw_Content
     (Msg : in Incoming_Message;
      Process : not null access procedure
      (Raw_Content : in Serializables.Serialization_Buffer_List));

Queries the raw (binary) body content.

This operation can be executed only if the agent is configured for raw content delivery.

Move

   procedure Move (What : in out Incoming_Message;
                   Where : in out Incoming_Message);

Stores the content of Incoming_Message in other object.

Note: the destination object should be empty and the source object becomes empty after this operation.

Reply

   procedure Reply (Msg : in Incoming_Message;
                    Priority : in Natural := 0);
   procedure Reply (Msg : in Incoming_Message;
                    Reply_Content : in Serializables.Serializable'Class;
                    Priority : in Natural := 0);

Sends back the reply.

Reject

   procedure Reject (Msg : in Incoming_Message;
                     Reason : in String := "";
                     Priority : in Natural := 0);

Sends back the rejection notification.

New_Message

   function New_Message
     (Core_Agent : in Core.Agents.Agent_Access;
      Connection_Event_Handler :
        in Details.Core_Connection_Handlers.Handler_Access;
      Message_Id : in Parameters.YAMI_Long_Long_Integer;
      Source : in String;
      Object_Name : in String;
      Message_Name : in String;
      Content : in Parameters.Parameters_Collection_Access;
      Raw_Content : in Serializables.Serialization_Buffer_List)
     return Incoming_Message_Access;

used internally

Call

   procedure Call (H : in out Message_Handler;
                   Message : in out Incoming_Message'Class)
      is abstract;

Processes the new incoming message.