Previous Table of Contents Next


22.6.1 Callback Model Signatures


   When the callback model is used, the client supplies a reply handler when making the asynchronous invocation. The interface’s operations and attributes are mapped to implied-IDL operations with names prefixed by “sendc_?. If this implied-IDL operation name conflicts with existing operations on the interface or any of the interface’s base interfaces, “ami_? strings are inserted between “sendc_? and the original operation name until the implied-IDL operation name is unique.

   22.6.1.1 Implied-IDL for Operations

   The signature of the implied-IDL for a given IDL operation is:

   • out arguments are ignored (i.e., are not part of the async signature).

   The implied-IDL operation signature has a context expression identical to the one from the original operation (if any is present).

   22.6.1.2 Implied-IDL for Attributes

   The signature of the implied-IDL for the callback model getter and setter operations corresponding to an interface’s attribute is as follows.

   The callback implied-IDL operations take the following arguments in order:

   22.6.1.3 Example

   The following implied-IDL is generated from the interface definitions used in the running example:

   // AMI implied-IDL including callback operations// for original example IDL defined in Section 22.5

   exception InvalidStock { string sym; };

   interface AMI_StockManagerHandler;

   interface StockManager {

   // Original operation Declarationsattribute string stock_exchange_name;boolean add_stock(in string symbol, in double quote);void edit_stock(in string symbol, in double new_quote)

   raises(InvalidStock); void remove_stock(in string symbol, out double quote)

   raises(InvalidStock); boolean find_closest_symbol(inout string symbol); double get_quote(in string symbol) raises(InvalidStock);

   // Async Callback operation Declarations void sendc_get_stock_exchange_name( in AMI_StockManagerHandler ami_handler);

   void sendc_set_stock_exchange_name( in AMI_StockManagerHandler ami_handler, in string attr_stock_exchange_name);

   void sendc_add_stock( in AMI_StockManagerHandler ami_handler, in string symbol, in double quote);

   void sendc_edit_stock( in AMI_StockManagerHandler ami_handler, in string symbol, in double new_quote);

   void sendc_remove_stock( in AMI_StockManagerHandler ami_handler, in string symbol);

   void sendc_find_closest_symbol( in AMI_StockManagerHandler ami_handler, in string symbol);

   void sendc_get_quote( in AMI_StockManagerHandler ami_handler, in string symbol);

   };