Skip to main content

Product: OpenFusion Notification Service

Version: 2.1 and above

 

Description:

How to send a structure in a structured event?

 

Solution:

In a structured event, data is stored as Anys: either in the remainder-of-body, or in the value part of a Property (e.g. in the variable header or filterable data components).

The data that is to be sent within the structured event needs to be defined in IDL. This allows the ORB to convert it into a CORBA.Any object. Once this has been done you can insert the any into the remainder_of_body of a StructuredEvent.

When you use a java idl compiler to compile your IDL data type definition it will generate a java class representing your IDL structure and a helper class that can convert an instance of this java class to a CORBA.Any, and (on the consumer side) extract the java class from a CORBA.Any. For C you can use the insertion operator to add the structure into the CORBA.Any and the and the extractor operator to retrieve the structure from the CORBA.Any.


#OpenFusion
#notificationservice
#KnowledgeDocs