author | msheppar |
Thu, 09 Feb 2017 15:52:43 +0000 | |
changeset 43737 | b1a42dfc5eec |
parent 43345 | a3460624dc33 |
child 45144 | a81f7f7ccb59 |
permissions | -rw-r--r-- |
4 | 1 |
/* |
29827 | 2 |
* Copyright (c) 1995, 2015, Oracle and/or its affiliates. All rights reserved. |
4 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5555 | 7 |
* published by the Free Software Foundation. Oracle designates this |
4 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5555 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
4 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5555 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
4 | 24 |
*/ |
25 |
||
26 |
package org.omg.CORBA; |
|
27 |
||
28 |
import org.omg.CORBA.portable.*; |
|
29 |
import org.omg.CORBA.ORBPackage.InvalidName; |
|
30 |
||
31 |
import java.util.Properties; |
|
32 |
import java.applet.Applet; |
|
33 |
import java.io.File; |
|
34 |
import java.io.FileInputStream; |
|
35 |
||
36 |
import java.security.AccessController; |
|
37 |
import java.security.PrivilegedAction; |
|
38 |
||
39 |
/** |
|
40 |
* A class providing APIs for the CORBA Object Request Broker |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
41 |
* features. The {@code ORB} class also provides |
4 | 42 |
* "pluggable ORB implementation" APIs that allow another vendor's ORB |
43 |
* implementation to be used. |
|
44 |
* <P> |
|
45 |
* An ORB makes it possible for CORBA objects to communicate |
|
46 |
* with each other by connecting objects making requests (clients) with |
|
47 |
* objects servicing requests (servers). |
|
48 |
* <P> |
|
49 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
50 |
* The {@code ORB} class, which |
4 | 51 |
* encapsulates generic CORBA functionality, does the following: |
52 |
* (Note that items 5 and 6, which include most of the methods in |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
53 |
* the class {@code ORB}, are typically used with the |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
54 |
* {@code Dynamic Invocation Interface} (DII) and |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
55 |
* the {@code Dynamic Skeleton Interface} (DSI). |
4 | 56 |
* These interfaces may be used by a developer directly, but |
57 |
* most commonly they are used by the ORB internally and are |
|
58 |
* not seen by the general programmer.) |
|
59 |
* <OL> |
|
60 |
* <li> initializes the ORB implementation by supplying values for |
|
61 |
* predefined properties and environmental parameters |
|
62 |
* <li> obtains initial object references to services such as |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
63 |
* the NameService using the method {@code resolve_initial_references} |
4 | 64 |
* <li> converts object references to strings and back |
65 |
* <li> connects the ORB to a servant (an instance of a CORBA object |
|
66 |
* implementation) and disconnects the ORB from a servant |
|
67 |
* <li> creates objects such as |
|
68 |
* <ul> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
69 |
* <li>{@code TypeCode} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
70 |
* <li>{@code Any} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
71 |
* <li>{@code NamedValue} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
72 |
* <li>{@code Context} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
73 |
* <li>{@code Environment} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
74 |
* <li>lists (such as {@code NVList}) containing these objects |
4 | 75 |
* </ul> |
76 |
* <li> sends multiple messages in the DII |
|
77 |
* </OL> |
|
78 |
* |
|
79 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
80 |
* The {@code ORB} class can be used to obtain references to objects |
4 | 81 |
* implemented anywhere on the network. |
82 |
* <P> |
|
83 |
* An application or applet gains access to the CORBA environment |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
84 |
* by initializing itself into an {@code ORB} using one of |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
85 |
* three {@code init} methods. Two of the three methods use the properties |
4 | 86 |
* (associations of a name with a value) shown in the |
87 |
* table below.<BR> |
|
88 |
* <TABLE BORDER=1 SUMMARY="Standard Java CORBA Properties"> |
|
89 |
* <TR><TH>Property Name</TH> <TH>Property Value</TH></TR> |
|
90 |
* <CAPTION>Standard Java CORBA Properties:</CAPTION> |
|
91 |
* <TR><TD>org.omg.CORBA.ORBClass</TD> |
|
92 |
* <TD>class name of an ORB implementation</TD></TR> |
|
93 |
* <TR><TD>org.omg.CORBA.ORBSingletonClass</TD> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
94 |
* <TD>class name of the ORB returned by {@code init()}</TD></TR> |
4 | 95 |
* </TABLE> |
96 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
97 |
* These properties allow a different vendor's {@code ORB} |
4 | 98 |
* implementation to be "plugged in." |
99 |
* <P> |
|
100 |
* When an ORB instance is being created, the class name of the ORB |
|
101 |
* implementation is located using |
|
29827 | 102 |
* the following standard search order: |
4 | 103 |
* |
104 |
* <OL> |
|
105 |
* <LI>check in Applet parameter or application string array, if any |
|
106 |
* |
|
107 |
* <LI>check in properties parameter, if any |
|
108 |
* |
|
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
109 |
* <LI>check in the System properties, if any |
4 | 110 |
* |
111 |
* <LI>check in the orb.properties file located in the user.home |
|
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
112 |
* directory, if any |
4 | 113 |
* |
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
114 |
* <LI>check in the orb.properties file located in the run-time image, |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
115 |
* if any |
4 | 116 |
* |
117 |
* <LI>fall back on a hardcoded default behavior (use the Java IDL |
|
118 |
* implementation) |
|
119 |
* </OL> |
|
120 |
* <P> |
|
121 |
* Note that Java IDL provides a default implementation for the |
|
122 |
* fully-functional ORB and for the Singleton ORB. When the method |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
123 |
* {@code init} is given no parameters, the default Singleton |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
124 |
* ORB is returned. When the method {@code init} is given parameters |
4 | 125 |
* but no ORB class is specified, the Java IDL ORB implementation |
126 |
* is returned. |
|
127 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
128 |
* The following code fragment creates an {@code ORB} object |
4 | 129 |
* initialized with the default ORB Singleton. |
130 |
* This ORB has a |
|
131 |
* restricted implementation to prevent malicious applets from doing |
|
132 |
* anything beyond creating typecodes. |
|
133 |
* It is called a singleton |
|
134 |
* because there is only one instance for an entire virtual machine. |
|
135 |
* <PRE> |
|
136 |
* ORB orb = ORB.init(); |
|
137 |
* </PRE> |
|
138 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
139 |
* The following code fragment creates an {@code ORB} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
140 |
* for an application. The parameter {@code args} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
141 |
* represents the arguments supplied to the application's {@code main} |
4 | 142 |
* method. Since the property specifies the ORB class to be |
143 |
* "SomeORBImplementation", the new ORB will be initialized with |
|
144 |
* that ORB implementation. If p had been null, |
|
145 |
* and the arguments had not specified an ORB class, |
|
146 |
* the new ORB would have been |
|
147 |
* initialized with the default Java IDL implementation. |
|
148 |
* <PRE> |
|
149 |
* Properties p = new Properties(); |
|
150 |
* p.put("org.omg.CORBA.ORBClass", "SomeORBImplementation"); |
|
151 |
* ORB orb = ORB.init(args, p); |
|
152 |
* </PRE> |
|
153 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
154 |
* The following code fragment creates an {@code ORB} object |
4 | 155 |
* for the applet supplied as the first parameter. If the given |
156 |
* applet does not specify an ORB class, the new ORB will be |
|
157 |
* initialized with the default Java IDL implementation. |
|
158 |
* <PRE> |
|
159 |
* ORB orb = ORB.init(myApplet, null); |
|
160 |
* </PRE> |
|
161 |
* <P> |
|
162 |
* An application or applet can be initialized in one or more ORBs. |
|
163 |
* ORB initialization is a bootstrap call into the CORBA world. |
|
23943 | 164 |
* |
165 |
* |
|
166 |
* @implNote |
|
27519
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
167 |
* When a singleton ORB is configured via the system property, |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
168 |
* or orb.properties, it will be |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
169 |
* located, and loaded via the system class loader. |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
170 |
* Thus, where appropriate, it is necessary that |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
171 |
* the classes for this alternative ORBSingleton are available on the application's class path. |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
172 |
* It should be noted that the singleton ORB is system wide. |
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
173 |
* <P> |
27519
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
174 |
* When a per-application ORB is created via the 2-arg init methods, |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
175 |
* then it will be located using the thread context class loader. |
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
176 |
* <P> |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
177 |
* The IDL to Java Language OMG specification documents the ${java.home}/lib directory as the location, |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
178 |
* in the Java run-time image, to search for orb.properties. |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
179 |
* This location is not intended for user editable configuration files. |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
180 |
* Therefore, the implementation first checks the ${java.home}/conf directory for orb.properties, |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
181 |
* and thereafter the ${java.home}/lib directory. |
23943 | 182 |
* |
4 | 183 |
* @since JDK1.2 |
184 |
*/ |
|
185 |
abstract public class ORB { |
|
186 |
||
187 |
// |
|
188 |
// This is the ORB implementation used when nothing else is specified. |
|
189 |
// Whoever provides this class customizes this string to |
|
190 |
// point at their ORB implementation. |
|
191 |
// |
|
192 |
private static final String ORBClassKey = "org.omg.CORBA.ORBClass"; |
|
193 |
private static final String ORBSingletonClassKey = "org.omg.CORBA.ORBSingletonClass"; |
|
194 |
||
43345
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
195 |
// check that access to the class is not restricted by the security manager. |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
196 |
private static void checkPackageAccess(String name) { |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
197 |
SecurityManager s = System.getSecurityManager(); |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
198 |
if (s != null) { |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
199 |
String cname = name.replace('/', '.'); |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
200 |
if (cname.startsWith("[")) { |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
201 |
int b = cname.lastIndexOf('[') + 2; |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
202 |
if (b > 1 && b < cname.length()) { |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
203 |
cname = cname.substring(b); |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
204 |
} |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
205 |
} |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
206 |
int i = cname.lastIndexOf('.'); |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
207 |
if (i != -1) { |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
208 |
s.checkPackageAccess(cname.substring(0, i)); |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
209 |
} |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
210 |
} |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
211 |
} |
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
212 |
|
4 | 213 |
// |
214 |
// The global instance of the singleton ORB implementation which |
|
215 |
// acts as a factory for typecodes for generated Helper classes. |
|
216 |
// TypeCodes should be immutable since they may be shared across |
|
217 |
// different security contexts (applets). There should be no way to |
|
218 |
// use a TypeCode as a storage depot for illicitly passing |
|
219 |
// information or Java objects between different security contexts. |
|
220 |
// |
|
221 |
static private ORB singleton; |
|
222 |
||
223 |
// Get System property |
|
224 |
private static String getSystemProperty(final String name) { |
|
225 |
||
226 |
// This will not throw a SecurityException because this |
|
227 |
// class was loaded from rt.jar using the bootstrap classloader. |
|
228 |
String propValue = (String) AccessController.doPrivileged( |
|
229 |
new PrivilegedAction() { |
|
230 |
public java.lang.Object run() { |
|
231 |
return System.getProperty(name); |
|
232 |
} |
|
233 |
} |
|
234 |
); |
|
235 |
||
236 |
return propValue; |
|
237 |
} |
|
238 |
||
239 |
// Get property from orb.properties in either <user.home> or <java-home>/lib |
|
240 |
// directories. |
|
241 |
private static String getPropertyFromFile(final String name) { |
|
242 |
// This will not throw a SecurityException because this |
|
243 |
// class was loaded from rt.jar using the bootstrap classloader. |
|
244 |
||
245 |
String propValue = (String) AccessController.doPrivileged( |
|
246 |
new PrivilegedAction() { |
|
247 |
private Properties getFileProperties( String fileName ) { |
|
248 |
try { |
|
249 |
File propFile = new File( fileName ) ; |
|
250 |
if (!propFile.exists()) |
|
251 |
return null ; |
|
252 |
||
253 |
Properties props = new Properties() ; |
|
254 |
FileInputStream fis = new FileInputStream(propFile); |
|
255 |
try { |
|
256 |
props.load( fis ); |
|
257 |
} finally { |
|
258 |
fis.close() ; |
|
259 |
} |
|
260 |
||
261 |
return props ; |
|
262 |
} catch (Exception exc) { |
|
263 |
return null ; |
|
264 |
} |
|
265 |
} |
|
266 |
||
267 |
public java.lang.Object run() { |
|
268 |
String userHome = System.getProperty("user.home"); |
|
269 |
String fileName = userHome + File.separator + |
|
270 |
"orb.properties" ; |
|
271 |
Properties props = getFileProperties( fileName ) ; |
|
272 |
||
273 |
if (props != null) { |
|
274 |
String value = props.getProperty( name ) ; |
|
275 |
if (value != null) |
|
276 |
return value ; |
|
277 |
} |
|
278 |
||
279 |
String javaHome = System.getProperty("java.home"); |
|
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
280 |
|
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
281 |
fileName = javaHome + File.separator + "conf" |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
282 |
+ File.separator + "orb.properties"; |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
283 |
props = getFileProperties(fileName); |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
284 |
|
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
285 |
if (props != null) { |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
286 |
String value = props.getProperty(name); |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
287 |
if (value != null) |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
288 |
return value; |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
289 |
} |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
290 |
|
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
291 |
fileName = javaHome + File.separator + "lib" |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
292 |
+ File.separator + "orb.properties"; |
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
293 |
props = getFileProperties(fileName); |
4 | 294 |
|
295 |
if (props == null) |
|
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
296 |
return null; |
4 | 297 |
else |
43737
b1a42dfc5eec
8049375: Extend how the org.omg.CORBA.ORB handles the search for orb.properties
msheppar
parents:
43345
diff
changeset
|
298 |
return props.getProperty(name); |
4 | 299 |
} |
300 |
} |
|
301 |
); |
|
302 |
||
303 |
return propValue; |
|
304 |
} |
|
305 |
||
306 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
307 |
* Returns the {@code ORB} singleton object. This method always returns the |
4 | 308 |
* same ORB instance, which is an instance of the class described by the |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
309 |
* {@code org.omg.CORBA.ORBSingletonClass} system property. |
4 | 310 |
* <P> |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
311 |
* This no-argument version of the method {@code init} is used primarily |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
312 |
* as a factory for {@code TypeCode} objects, which are used by |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
313 |
* {@code Helper} classes to implement the method {@code type}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
314 |
* It is also used to create {@code Any} objects that are used to |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
315 |
* describe {@code union} labels (as part of creating a |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
316 |
* {@code TypeCode} object for a {@code union}). |
4 | 317 |
* <P> |
318 |
* This method is not intended to be used by applets, and in the event |
|
319 |
* that it is called in an applet environment, the ORB it returns |
|
320 |
* is restricted so that it can be used only as a factory for |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
321 |
* {@code TypeCode} objects. Any {@code TypeCode} objects |
4 | 322 |
* it produces can be safely shared among untrusted applets. |
323 |
* <P> |
|
324 |
* If an ORB is created using this method from an applet, |
|
325 |
* a system exception will be thrown if |
|
326 |
* methods other than those for |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
327 |
* creating {@code TypeCode} objects are invoked. |
4 | 328 |
* |
329 |
* @return the singleton ORB |
|
27519
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
330 |
* |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
331 |
* @implNote |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
332 |
* When configured via the system property, or orb.properties, |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
333 |
* the system-wide singleton ORB is located via the |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
334 |
* system class loader. |
4 | 335 |
*/ |
2664
a0a22a8f16bd
6372405: Server thread hangs when fragments don't complete because of connection abort
tbell
parents:
4
diff
changeset
|
336 |
public static synchronized ORB init() { |
4 | 337 |
if (singleton == null) { |
338 |
String className = getSystemProperty(ORBSingletonClassKey); |
|
339 |
if (className == null) |
|
340 |
className = getPropertyFromFile(ORBSingletonClassKey); |
|
21860
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
341 |
if ((className == null) || |
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
342 |
(className.equals("com.sun.corba.se.impl.orb.ORBSingleton"))) { |
21431
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
343 |
singleton = new com.sun.corba.se.impl.orb.ORBSingleton(); |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
344 |
} else { |
23943 | 345 |
singleton = create_impl_with_systemclassloader(className); |
21431
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
346 |
} |
4 | 347 |
} |
348 |
return singleton; |
|
349 |
} |
|
350 |
||
23943 | 351 |
private static ORB create_impl_with_systemclassloader(String className) { |
352 |
||
353 |
try { |
|
43345
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
354 |
checkPackageAccess(className); |
23943 | 355 |
ClassLoader cl = ClassLoader.getSystemClassLoader(); |
356 |
Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class; |
|
357 |
Class<?> singletonOrbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); |
|
358 |
return (ORB)singletonOrbClass.newInstance(); |
|
359 |
} catch (Throwable ex) { |
|
360 |
SystemException systemException = new INITIALIZE( |
|
361 |
"can't instantiate default ORB implementation " + className); |
|
362 |
systemException.initCause(ex); |
|
363 |
throw systemException; |
|
364 |
} |
|
365 |
} |
|
366 |
||
4 | 367 |
private static ORB create_impl(String className) { |
368 |
ClassLoader cl = Thread.currentThread().getContextClassLoader(); |
|
369 |
if (cl == null) |
|
370 |
cl = ClassLoader.getSystemClassLoader(); |
|
371 |
||
372 |
try { |
|
43345
a3460624dc33
8170116: Remove qualified exports from java.base to java.corba
prappo
parents:
32688
diff
changeset
|
373 |
checkPackageAccess(className); |
23943 | 374 |
Class<org.omg.CORBA.ORB> orbBaseClass = org.omg.CORBA.ORB.class; |
375 |
Class<?> orbClass = Class.forName(className, true, cl).asSubclass(orbBaseClass); |
|
376 |
return (ORB)orbClass.newInstance(); |
|
4 | 377 |
} catch (Throwable ex) { |
378 |
SystemException systemException = new INITIALIZE( |
|
379 |
"can't instantiate default ORB implementation " + className); |
|
380 |
systemException.initCause(ex); |
|
381 |
throw systemException; |
|
382 |
} |
|
383 |
} |
|
384 |
||
385 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
386 |
* Creates a new {@code ORB} instance for a standalone |
4 | 387 |
* application. This method may be called from applications |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
388 |
* only and returns a new fully functional {@code ORB} object |
4 | 389 |
* each time it is called. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
390 |
* @param args command-line arguments for the application's {@code main} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
391 |
* method; may be {@code null} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
392 |
* @param props application-specific properties; may be {@code null} |
4 | 393 |
* @return the newly-created ORB instance |
27519
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
394 |
* |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
395 |
* @implNote |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
396 |
* When configured via the system property, or orb.properties, |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
397 |
* the ORB is located via the thread context class loader. |
4 | 398 |
*/ |
399 |
public static ORB init(String[] args, Properties props) { |
|
400 |
// |
|
401 |
// Note that there is no standard command-line argument for |
|
402 |
// specifying the default ORB implementation. For an |
|
403 |
// application you can choose an implementation either by |
|
404 |
// setting the CLASSPATH to pick a different org.omg.CORBA |
|
405 |
// and it's baked-in ORB implementation default or by |
|
406 |
// setting an entry in the properties object or in the |
|
407 |
// system properties. |
|
408 |
// |
|
409 |
String className = null; |
|
410 |
ORB orb; |
|
411 |
||
412 |
if (props != null) |
|
413 |
className = props.getProperty(ORBClassKey); |
|
414 |
if (className == null) |
|
415 |
className = getSystemProperty(ORBClassKey); |
|
416 |
if (className == null) |
|
417 |
className = getPropertyFromFile(ORBClassKey); |
|
21860
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
418 |
if ((className == null) || |
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
419 |
(className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { |
21431
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
420 |
orb = new com.sun.corba.se.impl.orb.ORBImpl(); |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
421 |
} else { |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
422 |
orb = create_impl(className); |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
423 |
} |
4 | 424 |
orb.set_parameters(args, props); |
425 |
return orb; |
|
426 |
} |
|
427 |
||
428 |
||
429 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
430 |
* Creates a new {@code ORB} instance for an applet. This |
4 | 431 |
* method may be called from applets only and returns a new |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
432 |
* fully-functional {@code ORB} object each time it is called. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
433 |
* @param app the applet; may be {@code null} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
434 |
* @param props applet-specific properties; may be {@code null} |
4 | 435 |
* @return the newly-created ORB instance |
27519
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
436 |
* |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
437 |
* @implNote |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
438 |
* When configured via the system property, or orb.properties, |
a7ffe58455ea
8049522: Move @implNote in org.omg.CORBA.ORB to init method
msheppar
parents:
25862
diff
changeset
|
439 |
* the ORB is located via the thread context class loader. |
4 | 440 |
*/ |
441 |
public static ORB init(Applet app, Properties props) { |
|
442 |
String className; |
|
443 |
ORB orb; |
|
444 |
||
445 |
className = app.getParameter(ORBClassKey); |
|
446 |
if (className == null && props != null) |
|
447 |
className = props.getProperty(ORBClassKey); |
|
448 |
if (className == null) |
|
449 |
className = getSystemProperty(ORBClassKey); |
|
450 |
if (className == null) |
|
451 |
className = getPropertyFromFile(ORBClassKey); |
|
21860
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
452 |
if ((className == null) || |
3ba29895d289
8028215: ORB.init fails with SecurityException if properties select the JDK default ORB
msheppar
parents:
21431
diff
changeset
|
453 |
(className.equals("com.sun.corba.se.impl.orb.ORBImpl"))) { |
21431
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
454 |
orb = new com.sun.corba.se.impl.orb.ORBImpl(); |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
455 |
} else { |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
456 |
orb = create_impl(className); |
6f404f8e434c
8021257: com.sun.corba.se.** should be on restricted package list
alanb
parents:
7672
diff
changeset
|
457 |
} |
4 | 458 |
orb.set_parameters(app, props); |
459 |
return orb; |
|
460 |
} |
|
461 |
||
462 |
/** |
|
463 |
* Allows the ORB implementation to be initialized with the given |
|
464 |
* parameters and properties. This method, used in applications only, |
|
465 |
* is implemented by subclass ORB implementations and called |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
466 |
* by the appropriate {@code init} method to pass in its parameters. |
4 | 467 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
468 |
* @param args command-line arguments for the application's {@code main} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
469 |
* method; may be {@code null} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
470 |
* @param props application-specific properties; may be {@code null} |
4 | 471 |
*/ |
472 |
abstract protected void set_parameters(String[] args, Properties props); |
|
473 |
||
474 |
/** |
|
475 |
* Allows the ORB implementation to be initialized with the given |
|
476 |
* applet and parameters. This method, used in applets only, |
|
477 |
* is implemented by subclass ORB implementations and called |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
478 |
* by the appropriate {@code init} method to pass in its parameters. |
4 | 479 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
480 |
* @param app the applet; may be {@code null} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
481 |
* @param props applet-specific properties; may be {@code null} |
4 | 482 |
*/ |
483 |
abstract protected void set_parameters(Applet app, Properties props); |
|
484 |
||
485 |
/** |
|
486 |
* Connects the given servant object (a Java object that is |
|
487 |
* an instance of the server implementation class) |
|
488 |
* to the ORB. The servant class must |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
489 |
* extend the {@code ImplBase} class corresponding to the interface that is |
4 | 490 |
* supported by the server. The servant must thus be a CORBA object |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
491 |
* reference, and inherit from {@code org.omg.CORBA.Object}. |
4 | 492 |
* Servants created by the user can start receiving remote invocations |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
493 |
* after the method {@code connect} has been called. A servant may also be |
4 | 494 |
* automatically and implicitly connected to the ORB if it is passed as |
495 |
* an IDL parameter in an IDL method invocation on a non-local object, |
|
496 |
* that is, if the servant object has to be marshalled and sent outside of the |
|
497 |
* process address space. |
|
498 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
499 |
* Calling the method {@code connect} has no effect |
4 | 500 |
* when the servant object is already connected to the ORB. |
501 |
* <P> |
|
502 |
* Deprecated by the OMG in favor of the Portable Object Adapter APIs. |
|
503 |
* |
|
504 |
* @param obj The servant object reference |
|
505 |
*/ |
|
506 |
public void connect(org.omg.CORBA.Object obj) { |
|
507 |
throw new NO_IMPLEMENT(); |
|
508 |
} |
|
509 |
||
510 |
/** |
|
511 |
* Destroys the ORB so that its resources can be reclaimed. |
|
512 |
* Any operation invoked on a destroyed ORB reference will throw the |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
513 |
* {@code OBJECT_NOT_EXIST} exception. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
514 |
* Once an ORB has been destroyed, another call to {@code init} |
4 | 515 |
* with the same ORBid will return a reference to a newly constructed ORB.<p> |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
516 |
* If {@code destroy} is called on an ORB that has not been shut down, |
4 | 517 |
* it will start the shut down process and block until the ORB has shut down |
518 |
* before it destroys the ORB.<br> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
519 |
* If an application calls {@code destroy} in a thread that is currently servicing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
520 |
* an invocation, the {@code BAD_INV_ORDER} system exception will be thrown |
4 | 521 |
* with the OMG minor code 3, since blocking would result in a deadlock.<p> |
522 |
* For maximum portability and to avoid resource leaks, an application should |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
523 |
* always call {@code shutdown} and {@code destroy} |
4 | 524 |
* on all ORB instances before exiting. |
525 |
* |
|
526 |
* @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing an invocation |
|
527 |
*/ |
|
528 |
public void destroy( ) { |
|
529 |
throw new NO_IMPLEMENT(); |
|
530 |
} |
|
531 |
||
532 |
/** |
|
533 |
* Disconnects the given servant object from the ORB. After this method returns, |
|
534 |
* the ORB will reject incoming remote requests for the disconnected |
|
535 |
* servant and will send the exception |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
536 |
* {@code org.omg.CORBA.OBJECT_NOT_EXIST} back to the |
4 | 537 |
* remote client. Thus the object appears to be destroyed from the |
538 |
* point of view of remote clients. Note, however, that local requests issued |
|
539 |
* using the servant directly do not |
|
540 |
* pass through the ORB; hence, they will continue to be processed by the |
|
541 |
* servant. |
|
542 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
543 |
* Calling the method {@code disconnect} has no effect |
4 | 544 |
* if the servant is not connected to the ORB. |
545 |
* <P> |
|
546 |
* Deprecated by the OMG in favor of the Portable Object Adapter APIs. |
|
547 |
* |
|
548 |
* @param obj The servant object to be disconnected from the ORB |
|
549 |
*/ |
|
550 |
public void disconnect(org.omg.CORBA.Object obj) { |
|
551 |
throw new NO_IMPLEMENT(); |
|
552 |
} |
|
553 |
||
554 |
// |
|
555 |
// ORB method implementations. |
|
556 |
// |
|
557 |
// We are trying to accomplish 2 things at once in this class. |
|
558 |
// It can act as a default ORB implementation front-end, |
|
559 |
// creating an actual ORB implementation object which is a |
|
560 |
// subclass of this ORB class and then delegating the method |
|
561 |
// implementations. |
|
562 |
// |
|
563 |
// To accomplish the delegation model, the 'delegate' private instance |
|
564 |
// variable is set if an instance of this class is created directly. |
|
565 |
// |
|
566 |
||
567 |
/** |
|
568 |
* Returns a list of the initially available CORBA object references, |
|
569 |
* such as "NameService" and "InterfaceRepository". |
|
570 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
571 |
* @return an array of {@code String} objects that represent |
4 | 572 |
* the object references for CORBA services |
573 |
* that are initially available with this ORB |
|
574 |
*/ |
|
575 |
abstract public String[] list_initial_services(); |
|
576 |
||
577 |
/** |
|
578 |
* Resolves a specific object reference from the set of available |
|
579 |
* initial service names. |
|
580 |
* |
|
581 |
* @param object_name the name of the initial service as a string |
|
582 |
* @return the object reference associated with the given name |
|
583 |
* @exception InvalidName if the given name is not associated with a |
|
584 |
* known service |
|
585 |
*/ |
|
586 |
abstract public org.omg.CORBA.Object resolve_initial_references(String object_name) |
|
587 |
throws InvalidName; |
|
588 |
||
589 |
/** |
|
590 |
* Converts the given CORBA object reference to a string. |
|
591 |
* Note that the format of this string is predefined by IIOP, allowing |
|
592 |
* strings generated by a different ORB to be converted back into an object |
|
593 |
* reference. |
|
594 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
595 |
* The resulting {@code String} object may be stored or communicated |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
596 |
* in any way that a {@code String} object can be manipulated. |
4 | 597 |
* |
598 |
* @param obj the object reference to stringify |
|
599 |
* @return the string representing the object reference |
|
600 |
*/ |
|
601 |
abstract public String object_to_string(org.omg.CORBA.Object obj); |
|
602 |
||
603 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
604 |
* Converts a string produced by the method {@code object_to_string} |
4 | 605 |
* back to a CORBA object reference. |
606 |
* |
|
607 |
* @param str the string to be converted back to an object reference. It must |
|
608 |
* be the result of converting an object reference to a string using the |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
609 |
* method {@code object_to_string}. |
4 | 610 |
* @return the object reference |
611 |
*/ |
|
612 |
abstract public org.omg.CORBA.Object string_to_object(String str); |
|
613 |
||
614 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
615 |
* Allocates an {@code NVList} with (probably) enough |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
616 |
* space for the specified number of {@code NamedValue} objects. |
4 | 617 |
* Note that the specified size is only a hint to help with |
618 |
* storage allocation and does not imply the maximum size of the list. |
|
619 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
620 |
* @param count suggested number of {@code NamedValue} objects for |
4 | 621 |
* which to allocate space |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
622 |
* @return the newly-created {@code NVList} |
4 | 623 |
* |
624 |
* @see NVList |
|
625 |
*/ |
|
626 |
abstract public NVList create_list(int count); |
|
627 |
||
628 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
629 |
* Creates an {@code NVList} initialized with argument |
4 | 630 |
* descriptions for the operation described in the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
631 |
* {@code OperationDef} object. This {@code OperationDef} object |
4 | 632 |
* is obtained from an Interface Repository. The arguments in the |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
633 |
* returned {@code NVList} object are in the same order as in the |
4 | 634 |
* original IDL operation definition, which makes it possible for the list |
635 |
* to be used in dynamic invocation requests. |
|
636 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
637 |
* @param oper the {@code OperationDef} object to use to create the list |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
638 |
* @return a newly-created {@code NVList} object containing |
4 | 639 |
* descriptions of the arguments to the method described in the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
640 |
* {@code OperationDef} object |
4 | 641 |
* |
642 |
* @see NVList |
|
643 |
*/ |
|
644 |
public NVList create_operation_list(org.omg.CORBA.Object oper) |
|
645 |
{ |
|
646 |
// If we came here, it means that the actual ORB implementation |
|
647 |
// did not have a create_operation_list(...CORBA.Object oper) method, |
|
648 |
// so lets check if it has a create_operation_list(OperationDef oper) |
|
649 |
// method. |
|
650 |
try { |
|
651 |
// First try to load the OperationDef class |
|
652 |
String opDefClassName = "org.omg.CORBA.OperationDef"; |
|
23943 | 653 |
Class<?> opDefClass = null; |
4 | 654 |
|
655 |
ClassLoader cl = Thread.currentThread().getContextClassLoader(); |
|
656 |
if ( cl == null ) |
|
657 |
cl = ClassLoader.getSystemClassLoader(); |
|
658 |
// if this throws a ClassNotFoundException, it will be caught below. |
|
659 |
opDefClass = Class.forName(opDefClassName, true, cl); |
|
660 |
||
661 |
// OK, we loaded OperationDef. Now try to get the |
|
662 |
// create_operation_list(OperationDef oper) method. |
|
23943 | 663 |
Class<?>[] argc = { opDefClass }; |
4 | 664 |
java.lang.reflect.Method meth = |
665 |
this.getClass().getMethod("create_operation_list", argc); |
|
666 |
||
667 |
// OK, the method exists, so invoke it and be happy. |
|
5823 | 668 |
java.lang.Object[] argx = { oper }; |
4 | 669 |
return (org.omg.CORBA.NVList)meth.invoke(this, argx); |
670 |
} |
|
671 |
catch( java.lang.reflect.InvocationTargetException exs ) { |
|
672 |
Throwable t = exs.getTargetException(); |
|
673 |
if (t instanceof Error) { |
|
674 |
throw (Error) t; |
|
675 |
} |
|
676 |
else if (t instanceof RuntimeException) { |
|
677 |
throw (RuntimeException) t; |
|
678 |
} |
|
679 |
else { |
|
680 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
681 |
} |
|
682 |
} |
|
683 |
catch( RuntimeException ex ) { |
|
684 |
throw ex; |
|
685 |
} |
|
686 |
catch( Exception exr ) { |
|
687 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
688 |
} |
|
689 |
} |
|
690 |
||
691 |
||
692 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
693 |
* Creates a {@code NamedValue} object |
4 | 694 |
* using the given name, value, and argument mode flags. |
695 |
* <P> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
696 |
* A {@code NamedValue} object serves as (1) a parameter or return |
4 | 697 |
* value or (2) a context property. |
698 |
* It may be used by itself or |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
699 |
* as an element in an {@code NVList} object. |
4 | 700 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
701 |
* @param s the name of the {@code NamedValue} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
702 |
* @param any the {@code Any} value to be inserted into the |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
703 |
* {@code NamedValue} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
704 |
* @param flags the argument mode flags for the {@code NamedValue}: one of |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
705 |
* {@code ARG_IN.value}, {@code ARG_OUT.value}, |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
706 |
* or {@code ARG_INOUT.value}. |
4 | 707 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
708 |
* @return the newly-created {@code NamedValue} object |
4 | 709 |
* @see NamedValue |
710 |
*/ |
|
711 |
abstract public NamedValue create_named_value(String s, Any any, int flags); |
|
712 |
||
713 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
714 |
* Creates an empty {@code ExceptionList} object. |
4 | 715 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
716 |
* @return the newly-created {@code ExceptionList} object |
4 | 717 |
*/ |
718 |
abstract public ExceptionList create_exception_list(); |
|
719 |
||
720 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
721 |
* Creates an empty {@code ContextList} object. |
4 | 722 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
723 |
* @return the newly-created {@code ContextList} object |
4 | 724 |
* @see ContextList |
725 |
* @see Context |
|
726 |
*/ |
|
727 |
abstract public ContextList create_context_list(); |
|
728 |
||
729 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
730 |
* Gets the default {@code Context} object. |
4 | 731 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
732 |
* @return the default {@code Context} object |
4 | 733 |
* @see Context |
734 |
*/ |
|
735 |
abstract public Context get_default_context(); |
|
736 |
||
737 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
738 |
* Creates an {@code Environment} object. |
4 | 739 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
740 |
* @return the newly-created {@code Environment} object |
4 | 741 |
* @see Environment |
742 |
*/ |
|
743 |
abstract public Environment create_environment(); |
|
744 |
||
745 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
746 |
* Creates a new {@code org.omg.CORBA.portable.OutputStream} into which |
4 | 747 |
* IDL method parameters can be marshalled during method invocation. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
748 |
* @return the newly-created |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
749 |
* {@code org.omg.CORBA.portable.OutputStream} object |
4 | 750 |
*/ |
751 |
abstract public org.omg.CORBA.portable.OutputStream create_output_stream(); |
|
752 |
||
753 |
/** |
|
754 |
* Sends multiple dynamic (DII) requests asynchronously without expecting |
|
755 |
* any responses. Note that oneway invocations are not guaranteed to |
|
756 |
* reach the server. |
|
757 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
758 |
* @param req an array of request objects |
4 | 759 |
*/ |
760 |
abstract public void send_multiple_requests_oneway(Request[] req); |
|
761 |
||
762 |
/** |
|
763 |
* Sends multiple dynamic (DII) requests asynchronously. |
|
764 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
765 |
* @param req an array of {@code Request} objects |
4 | 766 |
*/ |
767 |
abstract public void send_multiple_requests_deferred(Request[] req); |
|
768 |
||
769 |
/** |
|
770 |
* Finds out if any of the deferred (asynchronous) invocations have |
|
771 |
* a response yet. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
772 |
* @return {@code true} if there is a response available; |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
773 |
* {@code false} otherwise |
4 | 774 |
*/ |
775 |
abstract public boolean poll_next_response(); |
|
776 |
||
777 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
778 |
* Gets the next {@code Request} instance for which a response |
4 | 779 |
* has been received. |
780 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
781 |
* @return the next {@code Request} object ready with a response |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
782 |
* @exception WrongTransaction if the method {@code get_next_response} |
4 | 783 |
* is called from a transaction scope different |
784 |
* from the one from which the original request was sent. See the |
|
785 |
* OMG Transaction Service specification for details. |
|
786 |
*/ |
|
787 |
abstract public Request get_next_response() throws WrongTransaction; |
|
788 |
||
789 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
790 |
* Retrieves the {@code TypeCode} object that represents |
4 | 791 |
* the given primitive IDL type. |
792 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
793 |
* @param tcKind the {@code TCKind} instance corresponding to the |
4 | 794 |
* desired primitive type |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
795 |
* @return the requested {@code TypeCode} object |
4 | 796 |
*/ |
797 |
abstract public TypeCode get_primitive_tc(TCKind tcKind); |
|
798 |
||
799 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
800 |
* Creates a {@code TypeCode} object representing an IDL {@code struct}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
801 |
* The {@code TypeCode} object is initialized with the given id, |
4 | 802 |
* name, and members. |
803 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
804 |
* @param id the repository id for the {@code struct} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
805 |
* @param name the name of the {@code struct} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
806 |
* @param members an array describing the members of the {@code struct} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
807 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
808 |
* an IDL {@code struct} |
4 | 809 |
*/ |
810 |
abstract public TypeCode create_struct_tc(String id, String name, |
|
811 |
StructMember[] members); |
|
812 |
||
813 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
814 |
* Creates a {@code TypeCode} object representing an IDL {@code union}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
815 |
* The {@code TypeCode} object is initialized with the given id, |
4 | 816 |
* name, discriminator type, and members. |
817 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
818 |
* @param id the repository id of the {@code union} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
819 |
* @param name the name of the {@code union} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
820 |
* @param discriminator_type the type of the {@code union} discriminator |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
821 |
* @param members an array describing the members of the {@code union} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
822 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
823 |
* an IDL {@code union} |
4 | 824 |
*/ |
825 |
abstract public TypeCode create_union_tc(String id, String name, |
|
826 |
TypeCode discriminator_type, |
|
827 |
UnionMember[] members); |
|
828 |
||
829 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
830 |
* Creates a {@code TypeCode} object representing an IDL {@code enum}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
831 |
* The {@code TypeCode} object is initialized with the given id, |
4 | 832 |
* name, and members. |
833 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
834 |
* @param id the repository id for the {@code enum} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
835 |
* @param name the name for the {@code enum} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
836 |
* @param members an array describing the members of the {@code enum} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
837 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
838 |
* an IDL {@code enum} |
4 | 839 |
*/ |
840 |
abstract public TypeCode create_enum_tc(String id, String name, String[] members); |
|
841 |
||
842 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
843 |
* Creates a {@code TypeCode} object representing an IDL {@code alias} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
844 |
* ({@code typedef}). |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
845 |
* The {@code TypeCode} object is initialized with the given id, |
4 | 846 |
* name, and original type. |
847 |
* |
|
848 |
* @param id the repository id for the alias |
|
849 |
* @param name the name for the alias |
|
850 |
* @param original_type |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
851 |
* the {@code TypeCode} object describing the original type |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
852 |
* for which this is an alias |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
853 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
854 |
* an IDL {@code alias} |
4 | 855 |
*/ |
856 |
abstract public TypeCode create_alias_tc(String id, String name, |
|
857 |
TypeCode original_type); |
|
858 |
||
859 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
860 |
* Creates a {@code TypeCode} object representing an IDL {@code exception}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
861 |
* The {@code TypeCode} object is initialized with the given id, |
4 | 862 |
* name, and members. |
863 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
864 |
* @param id the repository id for the {@code exception} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
865 |
* @param name the name for the {@code exception} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
866 |
* @param members an array describing the members of the {@code exception} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
867 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
868 |
* an IDL {@code exception} |
4 | 869 |
*/ |
870 |
abstract public TypeCode create_exception_tc(String id, String name, |
|
871 |
StructMember[] members); |
|
872 |
||
873 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
874 |
* Creates a {@code TypeCode} object representing an IDL {@code interface}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
875 |
* The {@code TypeCode} object is initialized with the given id |
4 | 876 |
* and name. |
877 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
878 |
* @param id the repository id for the interface |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
879 |
* @param name the name for the interface |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
880 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
881 |
* an IDL {@code interface} |
4 | 882 |
*/ |
883 |
||
884 |
abstract public TypeCode create_interface_tc(String id, String name); |
|
885 |
||
886 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
887 |
* Creates a {@code TypeCode} object representing a bounded IDL |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
888 |
* {@code string}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
889 |
* The {@code TypeCode} object is initialized with the given bound, |
4 | 890 |
* which represents the maximum length of the string. Zero indicates |
891 |
* that the string described by this type code is unbounded. |
|
892 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
893 |
* @param bound the bound for the {@code string}; cannot be negative |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
894 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
895 |
* a bounded IDL {@code string} |
4 | 896 |
* @exception BAD_PARAM if bound is a negative value |
897 |
*/ |
|
898 |
||
899 |
abstract public TypeCode create_string_tc(int bound); |
|
900 |
||
901 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
902 |
* Creates a {@code TypeCode} object representing a bounded IDL |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
903 |
* {@code wstring} (wide string). |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
904 |
* The {@code TypeCode} object is initialized with the given bound, |
4 | 905 |
* which represents the maximum length of the wide string. Zero indicates |
906 |
* that the string described by this type code is unbounded. |
|
907 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
908 |
* @param bound the bound for the {@code wstring}; cannot be negative |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
909 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
910 |
* a bounded IDL {@code wstring} |
4 | 911 |
* @exception BAD_PARAM if bound is a negative value |
912 |
*/ |
|
913 |
abstract public TypeCode create_wstring_tc(int bound); |
|
914 |
||
915 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
916 |
* Creates a {@code TypeCode} object representing an IDL {@code sequence}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
917 |
* The {@code TypeCode} object is initialized with the given bound and |
4 | 918 |
* element type. |
919 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
920 |
* @param bound the bound for the {@code sequence}, 0 if unbounded |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
921 |
* @param element_type the {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
922 |
* the elements contained in the {@code sequence} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
923 |
* |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
924 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
925 |
* an IDL {@code sequence} |
4 | 926 |
*/ |
927 |
abstract public TypeCode create_sequence_tc(int bound, TypeCode element_type); |
|
928 |
||
929 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
930 |
* Creates a {@code TypeCode} object representing a |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
931 |
* a recursive IDL {@code sequence}. |
4 | 932 |
* <P> |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
933 |
* For the IDL {@code struct} Node in following code fragment, |
4 | 934 |
* the offset parameter for creating its sequence would be 1: |
935 |
* <PRE> |
|
936 |
* Struct Node { |
|
937 |
* long value; |
|
938 |
* Sequence <Node> subnodes; |
|
939 |
* }; |
|
940 |
* </PRE> |
|
941 |
* |
|
942 |
* @param bound the bound for the sequence, 0 if unbounded |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
943 |
* @param offset the index to the enclosing {@code TypeCode} object |
4 | 944 |
* that describes the elements of this sequence |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
945 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
946 |
* a recursive sequence |
4 | 947 |
* @deprecated Use a combination of create_recursive_tc and create_sequence_tc instead |
948 |
* @see #create_recursive_tc(String) create_recursive_tc |
|
949 |
* @see #create_sequence_tc(int, TypeCode) create_sequence_tc |
|
950 |
*/ |
|
951 |
@Deprecated |
|
952 |
abstract public TypeCode create_recursive_sequence_tc(int bound, int offset); |
|
953 |
||
954 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
955 |
* Creates a {@code TypeCode} object representing an IDL {@code array}. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
956 |
* The {@code TypeCode} object is initialized with the given length and |
4 | 957 |
* element type. |
958 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
959 |
* @param length the length of the {@code array} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
960 |
* @param element_type a {@code TypeCode} object describing the type |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
961 |
* of element contained in the {@code array} |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
962 |
* @return a newly-created {@code TypeCode} object describing |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
963 |
* an IDL {@code array} |
4 | 964 |
*/ |
965 |
abstract public TypeCode create_array_tc(int length, TypeCode element_type); |
|
966 |
||
967 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
968 |
* Create a {@code TypeCode} object for an IDL native type. |
4 | 969 |
* |
970 |
* @param id the logical id for the native type. |
|
971 |
* @param name the name of the native type. |
|
972 |
* @return the requested TypeCode. |
|
973 |
*/ |
|
974 |
public org.omg.CORBA.TypeCode create_native_tc(String id, |
|
975 |
String name) |
|
976 |
{ |
|
977 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
978 |
} |
|
979 |
||
980 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
981 |
* Create a {@code TypeCode} object for an IDL abstract interface. |
4 | 982 |
* |
983 |
* @param id the logical id for the abstract interface type. |
|
984 |
* @param name the name of the abstract interface type. |
|
985 |
* @return the requested TypeCode. |
|
986 |
*/ |
|
987 |
public org.omg.CORBA.TypeCode create_abstract_interface_tc( |
|
988 |
String id, |
|
989 |
String name) |
|
990 |
{ |
|
991 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
992 |
} |
|
993 |
||
994 |
||
995 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
996 |
* Create a {@code TypeCode} object for an IDL fixed type. |
4 | 997 |
* |
998 |
* @param digits specifies the total number of decimal digits in the number |
|
999 |
* and must be from 1 to 31 inclusive. |
|
1000 |
* @param scale specifies the position of the decimal point. |
|
1001 |
* @return the requested TypeCode. |
|
1002 |
*/ |
|
1003 |
public org.omg.CORBA.TypeCode create_fixed_tc(short digits, short scale) |
|
1004 |
{ |
|
1005 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1006 |
} |
|
1007 |
||
1008 |
||
1009 |
// orbos 98-01-18: Objects By Value -- begin |
|
1010 |
||
1011 |
||
1012 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1013 |
* Create a {@code TypeCode} object for an IDL value type. |
4 | 1014 |
* The concrete_base parameter is the TypeCode for the immediate |
1015 |
* concrete valuetype base of the valuetype for which the TypeCode |
|
1016 |
* is being created. |
|
1017 |
* It may be null if the valuetype does not have a concrete base. |
|
1018 |
* |
|
1019 |
* @param id the logical id for the value type. |
|
1020 |
* @param name the name of the value type. |
|
1021 |
* @param type_modifier one of the value type modifier constants: |
|
1022 |
* VM_NONE, VM_CUSTOM, VM_ABSTRACT or VM_TRUNCATABLE |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1023 |
* @param concrete_base a {@code TypeCode} object |
4 | 1024 |
* describing the concrete valuetype base |
1025 |
* @param members an array containing the members of the value type |
|
1026 |
* @return the requested TypeCode |
|
1027 |
*/ |
|
1028 |
public org.omg.CORBA.TypeCode create_value_tc(String id, |
|
1029 |
String name, |
|
1030 |
short type_modifier, |
|
1031 |
TypeCode concrete_base, |
|
1032 |
ValueMember[] members) |
|
1033 |
{ |
|
1034 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1035 |
} |
|
1036 |
||
1037 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1038 |
* Create a recursive {@code TypeCode} object which |
4 | 1039 |
* serves as a placeholder for a concrete TypeCode during the process of creating |
1040 |
* TypeCodes which contain recursion. The id parameter specifies the repository id of |
|
1041 |
* the type for which the recursive TypeCode is serving as a placeholder. Once the |
|
1042 |
* recursive TypeCode has been properly embedded in the enclosing TypeCode which |
|
1043 |
* corresponds to the specified repository id, it will function as a normal TypeCode. |
|
1044 |
* Invoking operations on the recursive TypeCode before it has been embedded in the |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1045 |
* enclosing TypeCode will result in a {@code BAD_TYPECODE} exception. |
4 | 1046 |
* <P> |
1047 |
* For example, the following IDL type declaration contains recursion: |
|
1048 |
* <PRE> |
|
1049 |
* Struct Node { |
|
1050 |
* Sequence<Node> subnodes; |
|
1051 |
* }; |
|
1052 |
* </PRE> |
|
1053 |
* <P> |
|
1054 |
* To create a TypeCode for struct Node, you would invoke the TypeCode creation |
|
1055 |
* operations as shown below: |
|
1056 |
* <PRE> |
|
1057 |
* String nodeID = "IDL:Node:1.0"; |
|
1058 |
* TypeCode recursiveSeqTC = orb.create_sequence_tc(0, orb.create_recursive_tc(nodeID)); |
|
1059 |
* StructMember[] members = { new StructMember("subnodes", recursiveSeqTC, null) }; |
|
1060 |
* TypeCode structNodeTC = orb.create_struct_tc(nodeID, "Node", members); |
|
1061 |
* </PRE> |
|
1062 |
* <P> |
|
1063 |
* Also note that the following is an illegal IDL type declaration: |
|
1064 |
* <PRE> |
|
1065 |
* Struct Node { |
|
1066 |
* Node next; |
|
1067 |
* }; |
|
1068 |
* </PRE> |
|
1069 |
* <P> |
|
1070 |
* Recursive types can only appear within sequences which can be empty. |
|
1071 |
* That way marshaling problems, when transmitting the struct in an Any, are avoided. |
|
29827 | 1072 |
* |
4 | 1073 |
* @param id the logical id of the referenced type |
1074 |
* @return the requested TypeCode |
|
1075 |
*/ |
|
1076 |
public org.omg.CORBA.TypeCode create_recursive_tc(String id) { |
|
1077 |
// implemented in subclass |
|
1078 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1079 |
} |
|
1080 |
||
1081 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1082 |
* Creates a {@code TypeCode} object for an IDL value box. |
4 | 1083 |
* |
1084 |
* @param id the logical id for the value type |
|
1085 |
* @param name the name of the value type |
|
1086 |
* @param boxed_type the TypeCode for the type |
|
1087 |
* @return the requested TypeCode |
|
1088 |
*/ |
|
1089 |
public org.omg.CORBA.TypeCode create_value_box_tc(String id, |
|
1090 |
String name, |
|
1091 |
TypeCode boxed_type) |
|
1092 |
{ |
|
1093 |
// implemented in subclass |
|
1094 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1095 |
} |
|
1096 |
||
1097 |
// orbos 98-01-18: Objects By Value -- end |
|
1098 |
||
1099 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1100 |
* Creates an IDL {@code Any} object initialized to |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1101 |
* contain a {@code Typecode} object whose {@code kind} field |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1102 |
* is set to {@code TCKind.tc_null}. |
4 | 1103 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1104 |
* @return a newly-created {@code Any} object |
4 | 1105 |
*/ |
1106 |
abstract public Any create_any(); |
|
1107 |
||
1108 |
||
1109 |
||
1110 |
||
1111 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1112 |
* Retrieves a {@code Current} object. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1113 |
* The {@code Current} interface is used to manage thread-specific |
4 | 1114 |
* information for use by services such as transactions and security. |
1115 |
* |
|
1116 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
|
1117 |
* comments for unimplemented features</a> |
|
1118 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1119 |
* @return a newly-created {@code Current} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1120 |
* @deprecated use {@code resolve_initial_references}. |
4 | 1121 |
*/ |
1122 |
@Deprecated |
|
1123 |
public org.omg.CORBA.Current get_current() |
|
1124 |
{ |
|
1125 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1126 |
} |
|
1127 |
||
1128 |
/** |
|
1129 |
* This operation blocks the current thread until the ORB has |
|
1130 |
* completed the shutdown process, initiated when some thread calls |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1131 |
* {@code shutdown}. It may be used by multiple threads which |
4 | 1132 |
* get all notified when the ORB shuts down. |
1133 |
* |
|
1134 |
*/ |
|
1135 |
public void run() |
|
1136 |
{ |
|
1137 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1138 |
} |
|
1139 |
||
1140 |
/** |
|
1141 |
* Instructs the ORB to shut down, which causes all |
|
1142 |
* object adapters to shut down, in preparation for destruction.<br> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1143 |
* If the {@code wait_for_completion} parameter |
4 | 1144 |
* is true, this operation blocks until all ORB processing (including |
1145 |
* processing of currently executing requests, object deactivation, |
|
1146 |
* and other object adapter operations) has completed. |
|
1147 |
* If an application does this in a thread that is currently servicing |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1148 |
* an invocation, the {@code BAD_INV_ORDER} system exception |
4 | 1149 |
* will be thrown with the OMG minor code 3, |
1150 |
* since blocking would result in a deadlock.<br> |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1151 |
* If the {@code wait_for_completion} parameter is {@code FALSE}, |
4 | 1152 |
* then shutdown may not have completed upon return.<p> |
1153 |
* While the ORB is in the process of shutting down, the ORB operates as normal, |
|
1154 |
* servicing incoming and outgoing requests until all requests have been completed. |
|
1155 |
* Once an ORB has shutdown, only object reference management operations |
|
1156 |
* may be invoked on the ORB or any object reference obtained from it. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1157 |
* An application may also invoke the {@code destroy} operation on the ORB itself. |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1158 |
* Invoking any other operation will throw the {@code BAD_INV_ORDER} |
4 | 1159 |
* system exception with the OMG minor code 4.<p> |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1160 |
* The {@code ORB.run} method will return after |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1161 |
* {@code shutdown} has been called. |
4 | 1162 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1163 |
* @param wait_for_completion {@code true} if the call |
4 | 1164 |
* should block until the shutdown is complete; |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1165 |
* {@code false} if it should return immediately |
4 | 1166 |
* @throws org.omg.CORBA.BAD_INV_ORDER if the current thread is servicing |
1167 |
* an invocation |
|
1168 |
*/ |
|
1169 |
public void shutdown(boolean wait_for_completion) |
|
1170 |
{ |
|
1171 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1172 |
} |
|
1173 |
||
1174 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1175 |
* Returns {@code true} if the ORB needs the main thread to |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1176 |
* perform some work, and {@code false} if the ORB does not |
4 | 1177 |
* need the main thread. |
1178 |
* |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1179 |
* @return {@code true} if there is work pending, meaning that the ORB |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1180 |
* needs the main thread to perform some work; {@code false} |
4 | 1181 |
* if there is no work pending and thus the ORB does not need the |
1182 |
* main thread |
|
1183 |
* |
|
1184 |
*/ |
|
1185 |
public boolean work_pending() |
|
1186 |
{ |
|
1187 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1188 |
} |
|
1189 |
||
1190 |
/** |
|
1191 |
* Performs an implementation-dependent unit of work if called |
|
1192 |
* by the main thread. Otherwise it does nothing. |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1193 |
* The methods {@code work_pending} and {@code perform_work} |
4 | 1194 |
* can be used in |
1195 |
* conjunction to implement a simple polling loop that multiplexes |
|
1196 |
* the main thread among the ORB and other activities. |
|
1197 |
* |
|
1198 |
*/ |
|
1199 |
public void perform_work() |
|
1200 |
{ |
|
1201 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1202 |
} |
|
1203 |
||
1204 |
/** |
|
1205 |
* Used to obtain information about CORBA facilities and services |
|
1206 |
* that are supported by this ORB. The service type for which |
|
1207 |
* information is being requested is passed in as the in |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1208 |
* parameter {@code service_type}, the values defined by |
4 | 1209 |
* constants in the CORBA module. If service information is |
1210 |
* available for that type, that is returned in the out parameter |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1211 |
* {@code service_info}, and the operation returns the |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1212 |
* value {@code true}. If no information for the requested |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1213 |
* services type is available, the operation returns {@code false} |
4 | 1214 |
* (i.e., the service is not supported by this ORB). |
29827 | 1215 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1216 |
* @param service_type a {@code short} indicating the |
4 | 1217 |
* service type for which information is being requested |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1218 |
* @param service_info a {@code ServiceInformationHolder} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1219 |
* that will hold the {@code ServiceInformation} object |
4 | 1220 |
* produced by this method |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1221 |
* @return {@code true} if service information is available |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1222 |
* for the {@code service_type}; |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1223 |
* {@code false} if no information for the |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1224 |
* requested services type is available |
4 | 1225 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1226 |
* comments for unimplemented features</a> |
|
1227 |
*/ |
|
1228 |
public boolean get_service_information(short service_type, |
|
1229 |
ServiceInformationHolder service_info) |
|
1230 |
{ |
|
1231 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1232 |
} |
|
1233 |
||
1234 |
// orbos 98-01-18: Objects By Value -- begin |
|
1235 |
||
1236 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1237 |
* Creates a new {@code DynAny} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1238 |
* {@code Any} object. |
29827 | 1239 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1240 |
* @param value the {@code Any} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1241 |
* {@code DynAny} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1242 |
* @return the new {@code DynAny} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1243 |
* {@code Any} object |
4 | 1244 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1245 |
* comments for unimplemented features</a> |
|
1246 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1247 |
*/ |
|
1248 |
@Deprecated |
|
1249 |
public org.omg.CORBA.DynAny create_dyn_any(org.omg.CORBA.Any value) |
|
1250 |
{ |
|
1251 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1252 |
} |
|
1253 |
||
1254 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1255 |
* Creates a basic {@code DynAny} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1256 |
* {@code TypeCode} object. |
29827 | 1257 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1258 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1259 |
* {@code DynAny} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1260 |
* @return the new {@code DynAny} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1261 |
* {@code TypeCode} object |
4 | 1262 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1263 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1264 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1265 |
* comments for unimplemented features</a> |
|
1266 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1267 |
*/ |
|
1268 |
@Deprecated |
|
1269 |
public org.omg.CORBA.DynAny create_basic_dyn_any(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1270 |
{ |
|
1271 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1272 |
} |
|
1273 |
||
1274 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1275 |
* Creates a new {@code DynStruct} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1276 |
* {@code TypeCode} object. |
29827 | 1277 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1278 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1279 |
* {@code DynStruct} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1280 |
* @return the new {@code DynStruct} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1281 |
* {@code TypeCode} object |
4 | 1282 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1283 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1284 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1285 |
* comments for unimplemented features</a> |
|
1286 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1287 |
*/ |
|
1288 |
@Deprecated |
|
1289 |
public org.omg.CORBA.DynStruct create_dyn_struct(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1290 |
{ |
|
1291 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1292 |
} |
|
1293 |
||
1294 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1295 |
* Creates a new {@code DynSequence} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1296 |
* {@code TypeCode} object. |
29827 | 1297 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1298 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1299 |
* {@code DynSequence} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1300 |
* @return the new {@code DynSequence} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1301 |
* {@code TypeCode} object |
4 | 1302 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1303 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1304 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1305 |
* comments for unimplemented features</a> |
|
1306 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1307 |
*/ |
|
1308 |
@Deprecated |
|
1309 |
public org.omg.CORBA.DynSequence create_dyn_sequence(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1310 |
{ |
|
1311 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1312 |
} |
|
1313 |
||
1314 |
||
1315 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1316 |
* Creates a new {@code DynArray} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1317 |
* {@code TypeCode} object. |
29827 | 1318 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1319 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1320 |
* {@code DynArray} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1321 |
* @return the new {@code DynArray} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1322 |
* {@code TypeCode} object |
4 | 1323 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1324 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1325 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1326 |
* comments for unimplemented features</a> |
|
1327 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1328 |
*/ |
|
1329 |
@Deprecated |
|
1330 |
public org.omg.CORBA.DynArray create_dyn_array(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1331 |
{ |
|
1332 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1333 |
} |
|
1334 |
||
1335 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1336 |
* Creates a new {@code DynUnion} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1337 |
* {@code TypeCode} object. |
29827 | 1338 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1339 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1340 |
* {@code DynUnion} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1341 |
* @return the new {@code DynUnion} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1342 |
* {@code TypeCode} object |
4 | 1343 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1344 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1345 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1346 |
* comments for unimplemented features</a> |
|
1347 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1348 |
*/ |
|
1349 |
@Deprecated |
|
1350 |
public org.omg.CORBA.DynUnion create_dyn_union(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1351 |
{ |
|
1352 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1353 |
} |
|
1354 |
||
1355 |
/** |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1356 |
* Creates a new {@code DynEnum} object from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1357 |
* {@code TypeCode} object. |
29827 | 1358 |
* |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1359 |
* @param type the {@code TypeCode} object from which to create a new |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1360 |
* {@code DynEnum} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1361 |
* @return the new {@code DynEnum} object created from the given |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1362 |
* {@code TypeCode} object |
4 | 1363 |
* @throws org.omg.CORBA.ORBPackage.InconsistentTypeCode if the given |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1364 |
* {@code TypeCode} object is not consistent with the operation. |
4 | 1365 |
* @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
1366 |
* comments for unimplemented features</a> |
|
1367 |
* @deprecated Use the new <a href="../DynamicAny/DynAnyFactory.html">DynAnyFactory</a> API instead |
|
1368 |
*/ |
|
1369 |
@Deprecated |
|
1370 |
public org.omg.CORBA.DynEnum create_dyn_enum(org.omg.CORBA.TypeCode type) throws org.omg.CORBA.ORBPackage.InconsistentTypeCode |
|
1371 |
{ |
|
1372 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1373 |
} |
|
1374 |
||
1375 |
/** |
|
1376 |
* Can be invoked to create new instances of policy objects |
|
1377 |
* of a specific type with specified initial state. If |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1378 |
* {@code create_policy} fails to instantiate a new Policy |
4 | 1379 |
* object due to its inability to interpret the requested type |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1380 |
* and content of the policy, it raises the {@code PolicyError} |
4 | 1381 |
* exception with the appropriate reason. |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1382 |
* @param type the {@code PolicyType} of the policy object to |
4 | 1383 |
* be created |
1384 |
* @param val the value that will be used to set the initial |
|
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1385 |
* state of the {@code Policy} object that is created |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1386 |
* @return Reference to a newly created {@code Policy} object |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1387 |
* of type specified by the {@code type} parameter and |
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1388 |
* initialized to a state specified by the {@code val} |
4 | 1389 |
* parameter |
32688
936c391804a5
8133650: replace some <tt> tags (obsolete in html5) in CORBA docs
avstepan
parents:
29827
diff
changeset
|
1390 |
* @throws org.omg.CORBA.PolicyError when the requested |
4 | 1391 |
* policy is not supported or a requested initial state |
1392 |
* for the policy is not supported. |
|
1393 |
*/ |
|
1394 |
public org.omg.CORBA.Policy create_policy(int type, org.omg.CORBA.Any val) |
|
1395 |
throws org.omg.CORBA.PolicyError |
|
1396 |
{ |
|
1397 |
// Currently not implemented until PIORB. |
|
1398 |
throw new org.omg.CORBA.NO_IMPLEMENT(); |
|
1399 |
} |
|
1400 |
} |