author | jjg |
Tue, 30 May 2017 15:49:45 -0700 | |
changeset 45442 | a14177f1fbc1 |
parent 45144 | a81f7f7ccb59 |
child 47202 | 233d85df105b |
permissions | -rw-r--r-- |
45144 | 1 |
<!doctype html> |
4 | 2 |
<html> |
3 |
<head> |
|
4 |
<meta http-equiv="Content-Type" content="text/html"> |
|
5 |
<title>IDL-to-Java Generated Files</title> |
|
6 |
</head> |
|
7 |
<body bgcolor="#FFFFFF"> |
|
8 |
||
9 |
<H1>IDL-to-Java Generated Files</H1> |
|
10 |
||
29827 | 11 |
<P>The files that are generated by the IDL-to-Java compiler, in accordance with |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
12 |
the <em><a href="http://www.omg.org/cgi-bin/doc?ptc/00-01-08"> |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
13 |
IDL-to-Java Language Mapping Specification</a></em>, |
29827 | 14 |
which is implemented in Java<sup><font size="-2">TM</font></sup> SE 6 |
15 |
according the <a href="compliance.html">compliance</a> document. |
|
4 | 16 |
|
17 |
||
29827 | 18 |
<P>In general IDL names and identifiers are mapped to Java names |
19 |
and identifiers with no change. Because of the nature of the Java language, |
|
20 |
a single IDL construct may be mapped to several (differently named) Java constructs. |
|
21 |
The additional names are constructed by appending a descriptive suffix. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
22 |
For example, the IDL interface <code>foo</code> is mapped to the Java |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
23 |
interfaces <code>foo</code> and <code>fooOperations</code>, and additional |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
24 |
Java classes <code>fooHelper</code>, <code>fooHolder</code>, <code>fooPOA</code>, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
25 |
and optionally <code>fooPOATie</code>. |
4 | 26 |
|
27 |
||
28 |
||
29827 | 29 |
<P>The mapping in effect reserves the use of several names for its own purposes. These are: |
30 |
<UL> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
31 |
<LI>The Java class <a href="#helper"><code><type>Helper</code></a>, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
32 |
where <code><type></code> is the name of an IDL defined type. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
33 |
<LI>The Java class <a href="#holder"><code><type>Holder</code></a>, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
34 |
where <code><type></code> |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
35 |
is the name of an IDL defined type (with certain exceptions such as <code>typedef</code> aliases). |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
36 |
<LI>The Java classes <code><basicJavaType>Holder</code>, where <code><basicJavaType></code> |
29827 | 37 |
is one of the Java primitive datatypes that is used by one of the IDL basic datatypes. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
38 |
<LI>The Java classes <a href="#operations"><code><interface>Operations</code></a>, <code><interface>POA</code>, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
39 |
and <code><interface>POATie</code>, where <code><interface></code> is the name of an IDL interface type. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
40 |
<LI>The nested scope Java package name <code><interface>Package</code>, where <code><interface></code> |
29827 | 41 |
is the name of an IDL interface. |
42 |
</UL> |
|
4 | 43 |
|
44 |
||
45442 | 45 |
<H2><a id="helper">Helper Files</a></H2> |
29827 | 46 |
|
47 |
<P>Helper files supply several static methods needed to manipulate the type. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
48 |
These include <code>Any</code> insert and extract operations for the type, |
29827 | 49 |
getting the repository id, getting the typecode, and reading |
50 |
and writing the type from and to a stream. |
|
51 |
||
52 |
<P>The helper class for a mapped IDL interface or abstract interface also |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
53 |
include narrow operation(s). The static narrow method allows an <code>org.omg.CORBA.Object</code> |
29827 | 54 |
to be narrowed to the object reference of a more specific type. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
55 |
The IDL exception <code>CORBA::BAD_PARAM</code> is thrown if the narrow fails because |
29827 | 56 |
the object reference does not support the requested type. A different system exception |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
57 |
is raised to indicate other kinds of errors. Trying to narrow |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
58 |
a null will always succeed with a return value of null. |
4 | 59 |
|
45442 | 60 |
<H2><a id="holder">Holder Files</a></H2> |
29827 | 61 |
|
62 |
<P>Support for out and inout parameter passing modes requires the use of additional holder classes. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
63 |
These classes are available for all of the basic IDL datatypes in the <code>org.omg.CORBA</code> package |
29827 | 64 |
and are generated for all named user defined IDL types except those defined by typedefs. |
65 |
(Note that in this context user defined includes types that are defined in OMG specifications |
|
66 |
such as those for the Interface Repository, and other OMG services.) |
|
4 | 67 |
|
29827 | 68 |
<P>Each holder class has a constructor from an instance, a default constructor, and has |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
69 |
a public instance member, <code>value</code> which is the typed value. The default constructor |
29827 | 70 |
sets the value field to the default value for the type as defined by the Java language: |
71 |
false for boolean, 0 for numeric and char types, null for strings, null for object references. |
|
4 | 72 |
|
29827 | 73 |
<P>To support portable stubs and skeletons, holder classes also implement |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
74 |
the <code>org.omg.CORBA.portable.Streamable</code> interface. |
4 | 75 |
|
76 |
||
45442 | 77 |
<H2><a id="operations">Operations Files</a></H2> |
29827 | 78 |
|
79 |
<P>A non abstract IDL interface is mapped to two public Java interfaces: |
|
80 |
a <em>signature</em> interface and an <em>operations</em> interface. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
81 |
The signature interface, which extends <code>IDLEntity</code>, has the same |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
82 |
name as the IDL interface name and is used |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
83 |
as the signature type in method declarations |
29827 | 84 |
when interfaces of the specified type are used in other interfaces. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
85 |
The operations interface has the same name as the IDL interface |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
86 |
with the suffix <code>Operations</code> |
29827 | 87 |
appended to the end and is used in the server-side mapping and as a mechanism |
88 |
for providing optimized calls for collocated client and servers. |
|
89 |
||
90 |
<P>The Java operations interface contains the mapped operation signatures. |
|
91 |
The Java signature interface extends the operations interface, |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
92 |
the (mapped) base <code>org.omg.CORBA.Object</code>, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
93 |
as well as <code>org.omg.portable.IDLEntity</code>. |
29827 | 94 |
Methods can be invoked on the signature interface. Interface inheritance |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
95 |
expressed in IDL is reflected in both the Java signature |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
96 |
interface and operations interface hierarchies. |
29827 | 97 |
|
98 |
||
45442 | 99 |
<H2><a id="stub">Stubs</a></H2> |
29827 | 100 |
|
101 |
<P>For the mapping of a non-object-oriented language, there will be |
|
102 |
a programming interface to the stubs for each interface type. Generally, the stubs |
|
103 |
will present access to the OMG IDL-defined operations on an object in a way that is easy |
|
104 |
for programmers to predict once they are familiar with OMG IDL and the language mapping |
|
105 |
for the particular programming language. The stubs make calls on the rest of the ORB |
|
106 |
using interfaces that are private to, and presumably optimized for, the particular ORB Core. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
107 |
If more than one ORB is available, there may be different stubs |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
108 |
corresponding to the different ORBs. In this case, it is necessary for |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
109 |
the ORB and language mapping to cooperate to associate |
29827 | 110 |
the correct stubs with the particular object reference. |
4 | 111 |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
112 |
<P>Object-oriented programming languages, such as Java, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
113 |
C++, and Smalltalk, do not require stub interfaces. |
4 | 114 |
|
29827 | 115 |
<BR><BR> |
4 | 116 |
|
117 |
</body> |
|
118 |
</html> |