O'Reilly logo

Pure CORBA by Fintan Bolton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java Example of Passing anys

Java mapping maps the IDL type any to the Java class org.omg.CORBA.Any. There are two styles of access to CORBA.Any when inserting or extracting data: the API for built-in types and the API for user-defined types.

Insertion or extraction of built-in types is performed by invoking methods directly on CORBA.Any. For example, the IDL type long is inserted and extracted using the following methods:

// Java
void org.omg.CORBA.Any.insert_long(int l)
int org.omg.CORBA.Any.extract_long()

Insertion or extraction of user-defined types is performed by invoking methods defined on the Helper classes. For example, an IDL user-defined struct called Foo would be inserted and extracted using the following methods:

// Java void FooHelper.insert(org.omg.CORBA.Any ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required