Download Interface Definition Language

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript

In Java we cannot separate a class’s definition
from its implementations as we can in C++
Header files
 Implementation files

CORBA allows the separation of definition and
implementation
 CORBA uses IDL for defining interfaces between
clients and servers
 ORB Vendors provide specific IDL compilers for
supported languages


create target language stubs and skeletonsfor building
CORBA clients and servers

C, C++, Smalltalk, Java, COBOL …

due to differences in heritage IDL and Java types
don’t have a 1 to 1 mapping:
long
Java int
short
Java short
float
Java float
double
Java double
char
Java char
boolean Java boolean
octet
java byte
string
java.lang.String
any
Special type consisting of any of the above

ex.
interface Cooler {
int getHotWaterLevel();
int getWarnWaterLevel();
int getColdWaterLevel();
exception NoMoreWaterException { };
int getHotWater() throws NoMoreWaterException;
int getWarmWater() throws NoMoreWaterException;
int getColdWater() throws NoMoreWaterException;
}

Compiling the IDL using the javatoidl compiler
will produce six classes:






CoolerRef
CoolerHolder
CoolerOperations
CoolerStub
CoolerServant
CoolerSkeleton