Check out the new USENIX Web site. next up previous
Next: Using TORBA Proxies Up: Trading Proxy Generation Previous: Generated OMG IDL Interfaces


Generated Proxy Implementation

The generation of proxy implementations depends on the constructions of a given language. However, using an object-oriented language, each OMG IDL interface is implemented by a class inheriting from a base class provided by the TORBA runtime. These classes fully hide the ODP/OMG CosTrading technicity: use of the service interfaces and data structures, as well as exception handling. Such runtime classes provide generic operations used from proxy implementations. Figure 8 presents an excerpt of the lookup proxy implementation for the Printer offer type, generated for the OMG IDLscript language.

Figure 8: OMG IDLscript implementation of the Printer lookup proxy (excerpt)
\begin{figure}
\hrule\vskip 0.2cm
{\small\begin{verbatim}...

The Lookup class inherits from the TORBArt.LookupBase class provided by the TORBA runtime. The __Lookup__ constructor invokes the super-class constructor providing the TDL type name (i.e. Printer), as well as the implemented interface type (i.e. Printer::Lookup). The generic query operation is invoked by the query operation providing the constraint to apply. Then, the result is translated to a printer offer sequence (i.e. Printer::OfferSeq). The implementation of query operations, like query_faster and query_all, only consists of creating the associated constraint and invoking the query operation.


next up previous
Next: Using TORBA Proxies Up: Trading Proxy Generation Previous: Generated OMG IDL Interfaces
Raphael Marvie
2000-12-05