The send and receive statements (<iface-method-policy-binding>)

The send and receive statements are for configuring method call events for the specified interface. The send statement lets you configure message forwarding events when all method instances for the specified interface are called. The receive statement lets you configure events for delivery of these messages.

Syntax

<iface-method-policy-binding> ::=

<event-type> [<direction>] [<iface-method>] "="

<policy-list> ";"

<event-type> ::= "send"|"receive"

<direction> ::= "in"|"out"

<iface-method> ::= <interface-method-name>

["(" <arg-name> {"," <arg-name> "}"]

["[" <src-sid> "," <dst-sid> "]"]

Elements

<event-type>

Type of event that is checked when the method is called. Permissible values:

  • send – a message is sent by the entity
  • receive – a message is delivered to the entity.

<direction>

Specifies the direction of a message. Permissible values:

  • in – request-message
  • out – response-message

    The in value is used by default.

<iface-method>

Full name of the method and optional list of arguments. The names of arguments must be consistent with the names from the IDL description of the method.

If the method is not specified, the send or receive statement is applied to all methods.

<interface-method-name>

Full name of the method in the interface. The interface can be any interface, including the interface that the entity is not implementing. It has the following format:

PackageName.InterfaceName.MethodName

<arg-name>

Name of the argument.

<src-sid>

Name of the argument containing the identifier of the security context of the message sender-entity. This argument is implicitly defined and is passed in each interaction event of the entity. The argument name is arbitrarily defined. By this name, the argument can be passed to security policies in the list of arguments.

<dst-sid>

Name of the argument containing the identifier of the security context of the message recipient-entity. This argument is implicitly defined and is passed in each interaction event of the entity. The argument name is arbitrarily defined. By this name, the argument can be passed to security policies in the list of arguments.

<policy-list>

List of security policies that will be applied to an event.

Example

/* Policies applied to calls of all methods of the entity. They are computed each time an entity receives a request-message (regardless of the interface or method by which the request is passed).

*/

receive in = tl.control["request"];

/* Policies applied each time an entity returns a response-message.

*/

send out = tl.control["response"];

Configuring of the events using the send and receive statements is shown in the example of interaction between two entities (see the figure below).

kos_sdk_securitycfg_iface

Configuring of the messages delivery and forwarding events using the send and receive statements

Page top