IDL allows for specifying modules, consisting of interfaces. An interface specification may contain (read only) attributes and operations. Operations are synchronous, unless annotated as oneway. Operations may raise exceptions upon failure.
See www.infosys.tuwien.ac.at/Research/Corba/OMG
Although IDL is syntactically very similar to C++ or Java,
it completely lacks the algorithmic constructs of these languages.
Objects specified in IDL must be realized in one of the
languages for which an official IDL language binding exists,
such as C, Smalltalk, C++ or Java, or an unofficial binding,
such as Python, Perl and Prolog.
Example
interface world {
void hello();
void ask(in string x);
string tell();
oneway void halt();
};
};
All methods supported by the world interface are synchronous, except for the halt method, which is annotated as oneway.
The realization of the universe module
is given in Appendix Universe.
Types and values
Interfaces specify object types.
However, a value that identifies an object is always
a reference to the object.
In CORBA 2.0 it is not possible to send objects by value.
As a workaround, one may send records by value and
then locally instantiate an object.
Operations and exceptions
The signature of operations may also be assembled
dynamically, through the dynamic invocation interface
of the ORB.
The semantics for such requests are the same as
for requests via the operation stub generated
from the interface specification.
Interfaces and inheritance
Interfaces can inherit from other interfaces. This results in augmenting the interfaces with the attributes and operations of the inherited interface. However, in contrast to class inheritance in C++, IDL does not allow for operations to be overridden, nor for overloading operations, that is different signatures for the same operation.
Multiple (interface) inheritance is supported however,
provided that no clashes or overloading occurs.
The Object interface
Object next();
};
Language bindings
InterfaceDef get_interface();
Object duplicate();
...
}
In addition it must provide the signatures for operations defined by the Object Request Broker (which transmits requests over the network) and the Basic Object Adaptor (which translates method requests to actual object method or function invocations).
Access to the ORB and BOA is usually provided by means of so-called pseudo-objects, objects described by interfaces in IDL which are not necessarily implemented as ordinary objects. As an example, the Object interface describes the functionality that each IDL-defined object has.
(C) Æliens 04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.