Fri, 24 Sep 2010 22:42:14 -0700
6891766: Vulnerabilities in use of reflection in CORBA
Reviewed-by: hawtin
duke@1 | 1 | /* |
ohair@158 | 2 | * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. |
duke@1 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
duke@1 | 4 | * |
duke@1 | 5 | * This code is free software; you can redistribute it and/or modify it |
duke@1 | 6 | * under the terms of the GNU General Public License version 2 only, as |
ohair@158 | 7 | * published by the Free Software Foundation. Oracle designates this |
duke@1 | 8 | * particular file as subject to the "Classpath" exception as provided |
ohair@158 | 9 | * by Oracle in the LICENSE file that accompanied this code. |
duke@1 | 10 | * |
duke@1 | 11 | * This code is distributed in the hope that it will be useful, but WITHOUT |
duke@1 | 12 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
duke@1 | 13 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
duke@1 | 14 | * version 2 for more details (a copy is included in the LICENSE file that |
duke@1 | 15 | * accompanied this code). |
duke@1 | 16 | * |
duke@1 | 17 | * You should have received a copy of the GNU General Public License version |
duke@1 | 18 | * 2 along with this work; if not, write to the Free Software Foundation, |
duke@1 | 19 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
duke@1 | 20 | * |
ohair@158 | 21 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ohair@158 | 22 | * or visit www.oracle.com if you need additional information or have any |
ohair@158 | 23 | * questions. |
duke@1 | 24 | */ |
duke@1 | 25 | |
duke@1 | 26 | package org.omg.CORBA; |
duke@1 | 27 | import org.omg.CORBA.portable.*; |
duke@1 | 28 | |
duke@1 | 29 | |
duke@1 | 30 | /** |
duke@1 | 31 | * <P>Used as a base class for implementation of a local IDL interface in the |
duke@1 | 32 | * Java language mapping. It is a class which implements all the operations |
duke@1 | 33 | * in the <tt>org.omg.CORBA.Object</tt> interface. |
duke@1 | 34 | * <P>Local interfaces are implemented by using CORBA::LocalObject |
duke@1 | 35 | * to provide implementations of <code>Object</code> pseudo |
duke@1 | 36 | * operations and any other ORB-specific support mechanisms that are |
duke@1 | 37 | * appropriate for such objects. Object implementation techniques are |
duke@1 | 38 | * inherently language-mapping specific. Therefore, the |
duke@1 | 39 | * <code>LocalObject</code> type is not defined in IDL, but is specified |
duke@1 | 40 | * in each language mapping. |
duke@1 | 41 | * <P>Methods that do not apply to local objects throw |
duke@1 | 42 | * an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with the message, |
duke@1 | 43 | * "This is a locally contrained object." Attempting to use a |
duke@1 | 44 | * <TT>LocalObject</TT> to create a DII request results in NO_IMPLEMENT |
duke@1 | 45 | * system exception. Attempting to marshal or stringify a |
duke@1 | 46 | * <TT>LocalObject</TT> results in a MARSHAL system exception. Narrowing |
duke@1 | 47 | * and widening references to <TT>LocalObjects</TT> must work as for regular |
duke@1 | 48 | * object references. |
duke@1 | 49 | * <P><code>LocalObject</code> is to be used as the base class of locally |
duke@1 | 50 | * constrained objects, such as those in the PortableServer module. |
duke@1 | 51 | * The specification here is based on the CORBA Components |
duke@1 | 52 | * Volume I - orbos/99-07-01<P> |
duke@1 | 53 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 54 | * comments for unimplemented features</a> |
duke@1 | 55 | */ |
duke@1 | 56 | |
duke@1 | 57 | public class LocalObject implements org.omg.CORBA.Object |
duke@1 | 58 | { |
duke@1 | 59 | private static String reason = "This is a locally constrained object."; |
duke@1 | 60 | |
duke@1 | 61 | /** |
duke@1 | 62 | * Constructs a default <code>LocalObject</code> instance. |
duke@1 | 63 | */ |
duke@1 | 64 | public LocalObject() {} |
duke@1 | 65 | |
duke@1 | 66 | /** |
duke@1 | 67 | * <P>Determines whether the two object references are equivalent, |
duke@1 | 68 | * so far as the ORB can easily determine. Two object references are equivalent |
duke@1 | 69 | * if they are identical. Two distinct object references which in fact refer to |
duke@1 | 70 | * the same object are also equivalent. However, ORBs are not required |
duke@1 | 71 | * to attempt determination of whether two distinct object references |
duke@1 | 72 | * refer to the same object, since such determination could be impractically |
duke@1 | 73 | * expensive. |
duke@1 | 74 | * <P>Default implementation of the org.omg.CORBA.Object method. <P> |
duke@1 | 75 | * |
duke@1 | 76 | * @param that the object reference with which to check for equivalence |
duke@1 | 77 | * @return <code>true</code> if this object reference is known to be |
duke@1 | 78 | * equivalent to the given object reference. |
duke@1 | 79 | * Note that <code>false</code> indicates only that the two |
duke@1 | 80 | * object references are distinct, not necessarily that |
duke@1 | 81 | * they reference distinct objects. |
duke@1 | 82 | */ |
duke@1 | 83 | public boolean _is_equivalent(org.omg.CORBA.Object that) { |
duke@1 | 84 | return equals(that) ; |
duke@1 | 85 | } |
duke@1 | 86 | |
duke@1 | 87 | /** |
duke@1 | 88 | * Always returns <code>false</code>. |
duke@1 | 89 | * This method is the default implementation of the |
duke@1 | 90 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 91 | * |
duke@1 | 92 | * @return <code>false</code> |
duke@1 | 93 | */ |
duke@1 | 94 | public boolean _non_existent() { |
duke@1 | 95 | return false; |
duke@1 | 96 | } |
duke@1 | 97 | |
duke@1 | 98 | /** |
duke@1 | 99 | * Returns a hash value that is consistent for the |
duke@1 | 100 | * lifetime of the object, using the given number as the maximum. |
duke@1 | 101 | * This method is the default implementation of the |
duke@1 | 102 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 103 | * @param maximum an <code>int</code> identifying maximum value of |
duke@1 | 104 | * the hashcode |
duke@1 | 105 | * @return this instance's hashcode |
duke@1 | 106 | */ |
duke@1 | 107 | public int _hash(int maximum) { |
duke@1 | 108 | return hashCode() ; |
duke@1 | 109 | } |
duke@1 | 110 | |
duke@1 | 111 | /** |
duke@1 | 112 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 113 | * the message "This is a locally constrained object." This method |
duke@1 | 114 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 115 | * This method is the default implementation of the |
duke@1 | 116 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 117 | * |
duke@1 | 118 | * @param repository_id a <code>String</code> |
duke@1 | 119 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 120 | * and this method does not apply to local objects |
duke@1 | 121 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 122 | * and this method does not apply to local objects |
duke@1 | 123 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 124 | * comments for unimplemented features</a> |
duke@1 | 125 | */ |
duke@1 | 126 | public boolean _is_a(String repository_id) { |
duke@1 | 127 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 128 | } |
duke@1 | 129 | |
duke@1 | 130 | /** |
duke@1 | 131 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 132 | * the message "This is a locally constrained object." |
duke@1 | 133 | * This method is the default implementation of the |
duke@1 | 134 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 135 | * @return a duplicate of this <code>LocalObject</code> instance. |
duke@1 | 136 | * @exception NO_IMPLEMENT |
duke@1 | 137 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 138 | * comments for unimplemented features</a> |
duke@1 | 139 | */ |
duke@1 | 140 | public org.omg.CORBA.Object _duplicate() { |
duke@1 | 141 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 142 | } |
duke@1 | 143 | |
duke@1 | 144 | /** |
duke@1 | 145 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 146 | * the message "This is a locally constrained object." |
duke@1 | 147 | * This method is the default implementation of the |
duke@1 | 148 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 149 | * @exception NO_IMPLEMENT |
duke@1 | 150 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 151 | * comments for unimplemented features</a> |
duke@1 | 152 | */ |
duke@1 | 153 | public void _release() { |
duke@1 | 154 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 155 | } |
duke@1 | 156 | |
duke@1 | 157 | /** |
duke@1 | 158 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 159 | * the message "This is a locally constrained object." |
duke@1 | 160 | * This method is the default implementation of the |
duke@1 | 161 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 162 | * |
duke@1 | 163 | * @param operation a <code>String</code> giving the name of an operation |
duke@1 | 164 | * to be performed by the request that is returned |
duke@1 | 165 | * @return a <code>Request</code> object with the given operation |
duke@1 | 166 | * @exception NO_IMPLEMENT |
duke@1 | 167 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 168 | * comments for unimplemented features</a> |
duke@1 | 169 | */ |
duke@1 | 170 | public Request _request(String operation) { |
duke@1 | 171 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 172 | } |
duke@1 | 173 | |
duke@1 | 174 | /** |
duke@1 | 175 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 176 | * the message "This is a locally constrained object." |
duke@1 | 177 | * This method is the default implementation of the |
duke@1 | 178 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 179 | * |
duke@1 | 180 | * @param ctx a <code>Context</code> object containing |
duke@1 | 181 | * a list of properties |
duke@1 | 182 | * @param operation the <code>String</code> representing the name of the |
duke@1 | 183 | * method to be invoked |
duke@1 | 184 | * @param arg_list an <code>NVList</code> containing the actual arguments |
duke@1 | 185 | * to the method being invoked |
duke@1 | 186 | * @param result a <code>NamedValue</code> object to serve as a |
duke@1 | 187 | * container for the method's return value |
duke@1 | 188 | * @return a new <code>Request</code> object initialized with the given |
duke@1 | 189 | * arguments |
duke@1 | 190 | * @exception NO_IMPLEMENT |
duke@1 | 191 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 192 | * comments for unimplemented features</a> |
duke@1 | 193 | */ |
duke@1 | 194 | public Request _create_request(Context ctx, |
duke@1 | 195 | String operation, |
duke@1 | 196 | NVList arg_list, |
duke@1 | 197 | NamedValue result) { |
duke@1 | 198 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 199 | } |
duke@1 | 200 | |
duke@1 | 201 | /** |
duke@1 | 202 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 203 | * the message "This is a locally constrained object." |
duke@1 | 204 | * This method is the default implementation of the |
duke@1 | 205 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 206 | * |
duke@1 | 207 | * @param ctx a <code>Context</code> object containing |
duke@1 | 208 | * a list of properties |
duke@1 | 209 | * @param operation the name of the method to be invoked |
duke@1 | 210 | * @param arg_list an <code>NVList</code> containing the actual arguments |
duke@1 | 211 | * to the method being invoked |
duke@1 | 212 | * @param result a <code>NamedValue</code> object to serve as a |
duke@1 | 213 | * container for the method's return value |
duke@1 | 214 | * @param exceptions an <code>ExceptionList</code> object containing a |
duke@1 | 215 | * list of possible exceptions the method can throw |
duke@1 | 216 | * @param contexts a <code>ContextList</code> object containing a list of |
duke@1 | 217 | * context strings that need to be resolved and sent |
duke@1 | 218 | * with the |
duke@1 | 219 | * <code>Request</code> instance |
duke@1 | 220 | * @return the new <code>Request</code> object initialized with the given |
duke@1 | 221 | * arguments |
duke@1 | 222 | * @exception NO_IMPLEMENT |
duke@1 | 223 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 224 | * comments for unimplemented features</a> |
duke@1 | 225 | */ |
duke@1 | 226 | public Request _create_request(Context ctx, |
duke@1 | 227 | String operation, |
duke@1 | 228 | NVList arg_list, |
duke@1 | 229 | NamedValue result, |
duke@1 | 230 | ExceptionList exceptions, |
duke@1 | 231 | ContextList contexts) { |
duke@1 | 232 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 233 | } |
duke@1 | 234 | |
duke@1 | 235 | /** |
duke@1 | 236 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 237 | * the message "This is a locally constrained object." This method |
duke@1 | 238 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 239 | * This method is the default implementation of the |
duke@1 | 240 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 241 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 242 | * and this method does not apply to local objects |
duke@1 | 243 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 244 | * and this method does not apply to local objects |
duke@1 | 245 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 246 | * comments for unimplemented features</a> |
duke@1 | 247 | */ |
duke@1 | 248 | public org.omg.CORBA.Object _get_interface() |
duke@1 | 249 | { |
duke@1 | 250 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 251 | } |
duke@1 | 252 | |
duke@1 | 253 | /** |
duke@1 | 254 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 255 | * the message "This is a locally constrained object." |
duke@1 | 256 | * This method is the default implementation of the |
duke@1 | 257 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 258 | * @exception NO_IMPLEMENT |
duke@1 | 259 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 260 | * comments for unimplemented features</a> |
duke@1 | 261 | */ |
duke@1 | 262 | public org.omg.CORBA.Object _get_interface_def() |
duke@1 | 263 | { |
duke@1 | 264 | // First try to call the delegate implementation class's |
duke@1 | 265 | // "Object get_interface_def(..)" method (will work for JDK1.2 |
duke@1 | 266 | // ORBs). |
duke@1 | 267 | // Else call the delegate implementation class's |
duke@1 | 268 | // "InterfaceDef get_interface(..)" method using reflection |
duke@1 | 269 | // (will work for pre-JDK1.2 ORBs). |
duke@1 | 270 | |
duke@1 | 271 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 272 | } |
duke@1 | 273 | |
duke@1 | 274 | /** |
duke@1 | 275 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 276 | * the message "This is a locally constrained object." |
duke@1 | 277 | * This method is the default implementation of the |
duke@1 | 278 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 279 | * @return the ORB instance that created the Delegate contained in this |
duke@1 | 280 | * <code>ObjectImpl</code> |
duke@1 | 281 | * @exception NO_IMPLEMENT |
duke@1 | 282 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 283 | * comments for unimplemented features</a> |
duke@1 | 284 | */ |
duke@1 | 285 | public org.omg.CORBA.ORB _orb() { |
duke@1 | 286 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 287 | } |
duke@1 | 288 | |
duke@1 | 289 | /** |
duke@1 | 290 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 291 | * the message "This is a locally constrained object." This method |
duke@1 | 292 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 293 | * This method is the default implementation of the |
duke@1 | 294 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 295 | * @param policy_type an <code>int</code> |
duke@1 | 296 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 297 | * and this method does not apply to local objects |
duke@1 | 298 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 299 | * and this method does not apply to local objects |
duke@1 | 300 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 301 | * comments for unimplemented features</a> |
duke@1 | 302 | */ |
duke@1 | 303 | public org.omg.CORBA.Policy _get_policy(int policy_type) { |
duke@1 | 304 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 305 | } |
duke@1 | 306 | |
duke@1 | 307 | |
duke@1 | 308 | /** |
duke@1 | 309 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 310 | * the message "This is a locally constrained object." This method |
duke@1 | 311 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 312 | * This method is the default implementation of the |
duke@1 | 313 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 314 | * @exception NO_IMPLEMENT |
duke@1 | 315 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 316 | * comments for unimplemented features</a> |
duke@1 | 317 | */ |
duke@1 | 318 | public org.omg.CORBA.DomainManager[] _get_domain_managers() { |
duke@1 | 319 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 320 | } |
duke@1 | 321 | |
duke@1 | 322 | /** |
duke@1 | 323 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 324 | * the message "This is a locally constrained object." This method |
duke@1 | 325 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 326 | * This method is the default implementation of the |
duke@1 | 327 | * <code>org.omg.CORBA.Object</code> method. |
duke@1 | 328 | * |
duke@1 | 329 | * @param policies an array |
duke@1 | 330 | * @param set_add a flag |
duke@1 | 331 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 332 | * and this method does not apply to local objects |
duke@1 | 333 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 334 | * and this method does not apply to local objects |
duke@1 | 335 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 336 | * comments for unimplemented features</a> |
duke@1 | 337 | */ |
duke@1 | 338 | public org.omg.CORBA.Object |
duke@1 | 339 | _set_policy_override(org.omg.CORBA.Policy[] policies, |
duke@1 | 340 | org.omg.CORBA.SetOverrideType set_add) { |
duke@1 | 341 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 342 | } |
duke@1 | 343 | |
duke@1 | 344 | |
duke@1 | 345 | /** |
duke@1 | 346 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 347 | * the message "This is a locally constrained object." |
duke@1 | 348 | * This method is the default implementation of the |
duke@1 | 349 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 350 | * Returns <code>true</code> for this <code>LocalObject</code> instance.<P> |
duke@1 | 351 | * @return <code>true</code> always |
duke@1 | 352 | * @exception NO_IMPLEMENT |
duke@1 | 353 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 354 | * comments for unimplemented features</a> |
duke@1 | 355 | */ |
duke@1 | 356 | public boolean _is_local() { |
duke@1 | 357 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 358 | } |
duke@1 | 359 | |
duke@1 | 360 | /** |
duke@1 | 361 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 362 | * the message "This is a locally constrained object." |
duke@1 | 363 | * This method is the default implementation of the |
duke@1 | 364 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 365 | * @param operation a <code>String</code> indicating which operation |
duke@1 | 366 | * to preinvoke |
duke@1 | 367 | * @param expectedType the class of the type of operation mentioned above |
duke@1 | 368 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 369 | * and this method does not apply to local objects |
duke@1 | 370 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 371 | * and this method does not apply to local object |
duke@1 | 372 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 373 | * comments for unimplemented features</a> |
duke@1 | 374 | */ |
duke@1 | 375 | public ServantObject _servant_preinvoke(String operation, |
duke@1 | 376 | Class expectedType) { |
duke@1 | 377 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 378 | } |
duke@1 | 379 | |
duke@1 | 380 | /** |
duke@1 | 381 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 382 | * the message "This is a locally constrained object." |
duke@1 | 383 | * This method is the default implementation of the |
duke@1 | 384 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 385 | * @param servant the servant object on which to post-invoke |
duke@1 | 386 | * @exception NO_IMPLEMENT |
duke@1 | 387 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 388 | * comments for unimplemented features</a> |
duke@1 | 389 | */ |
duke@1 | 390 | public void _servant_postinvoke(ServantObject servant) { |
duke@1 | 391 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 392 | } |
duke@1 | 393 | |
duke@1 | 394 | /* |
duke@1 | 395 | * The following methods were added by orbos/98-04-03: Java to IDL |
duke@1 | 396 | * Mapping. These are used by RMI over IIOP. |
duke@1 | 397 | */ |
duke@1 | 398 | |
duke@1 | 399 | /** |
duke@1 | 400 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 401 | * the message "This is a locally constrained object." |
duke@1 | 402 | * This method is the default implementation of the |
duke@1 | 403 | * <code>org.omg.CORBA.Object</code> method. |
duke@1 | 404 | * <P>Called by a stub to obtain an OutputStream for |
duke@1 | 405 | * marshaling arguments. The stub must supply the operation name, |
duke@1 | 406 | * and indicate if a response is expected (i.e is this a oneway |
duke@1 | 407 | * call).<P> |
duke@1 | 408 | * @param operation the name of the operation being requested |
duke@1 | 409 | * @param responseExpected <code>true</code> if a response is expected, |
duke@1 | 410 | * <code>false</code> if it is a one-way call |
duke@1 | 411 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 412 | * and this method does not apply to local objects |
duke@1 | 413 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 414 | * and this method does not apply to local objects |
duke@1 | 415 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 416 | * comments for unimplemented features</a> |
duke@1 | 417 | */ |
duke@1 | 418 | public OutputStream _request(String operation, |
duke@1 | 419 | boolean responseExpected) { |
duke@1 | 420 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 421 | } |
duke@1 | 422 | |
duke@1 | 423 | /** |
duke@1 | 424 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 425 | * the message "This is a locally constrained object." |
duke@1 | 426 | * This method is the default implementation of the |
duke@1 | 427 | * <code>org.omg.CORBA.Object</code> method. |
duke@1 | 428 | * <P>Called to invoke an operation. The stub provides an |
duke@1 | 429 | * <code>OutputStream</code> that was previously returned by a |
duke@1 | 430 | * <code>_request()</code> |
duke@1 | 431 | * call. <code>_invoke</code> returns an <code>InputStream</code> which |
duke@1 | 432 | * contains the |
duke@1 | 433 | * marshaled reply. If an exception occurs, <code>_invoke</code> may throw an |
duke@1 | 434 | * <code>ApplicationException</code> object which contains an |
duke@1 | 435 | * <code>InputStream</code> from |
duke@1 | 436 | * which the user exception state may be unmarshaled.<P> |
duke@1 | 437 | * @param output the <code>OutputStream</code> to invoke |
duke@1 | 438 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 439 | * and this method does not apply to local objects |
duke@1 | 440 | * @throws ApplicationException If an exception occurs, |
duke@1 | 441 | * <code>_invoke</code> may throw an |
duke@1 | 442 | * <code>ApplicationException</code> object which contains |
duke@1 | 443 | * an <code>InputStream</code> from |
duke@1 | 444 | * which the user exception state may be unmarshaled. |
duke@1 | 445 | * @throws RemarshalException If an exception occurs, |
duke@1 | 446 | * <code>_invoke</code> may throw an |
duke@1 | 447 | * <code>ApplicationException</code> object which contains |
duke@1 | 448 | * an <code>InputStream</code> from |
duke@1 | 449 | * which the user exception state may be unmarshaled. |
duke@1 | 450 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 451 | * and this method does not apply to local objects |
duke@1 | 452 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 453 | * comments for unimplemented features</a> |
duke@1 | 454 | */ |
duke@1 | 455 | public InputStream _invoke(OutputStream output) |
duke@1 | 456 | throws ApplicationException, RemarshalException |
duke@1 | 457 | { |
duke@1 | 458 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 459 | } |
duke@1 | 460 | |
duke@1 | 461 | /** |
duke@1 | 462 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 463 | * the message "This is a locally constrained object." |
duke@1 | 464 | * This method is the default implementation of the |
duke@1 | 465 | * <code>org.omg.CORBA.Object</code> method. |
duke@1 | 466 | * <P>May optionally be called by a stub to release a |
duke@1 | 467 | * reply stream back to the ORB when the unmarshaling has |
duke@1 | 468 | * completed. The stub passes the <code>InputStream</code> returned by |
duke@1 | 469 | * <code>_invoke()</code> or |
duke@1 | 470 | * <code>ApplicationException.getInputStream()</code>. |
duke@1 | 471 | * A null |
duke@1 | 472 | * value may also be passed to <code>_releaseReply</code>, in which case the |
duke@1 | 473 | * method is a no-op.<P> |
duke@1 | 474 | * @param input the reply stream back to the ORB or null |
duke@1 | 475 | * @exception NO_IMPLEMENT |
duke@1 | 476 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 477 | * comments for unimplemented features</a> |
duke@1 | 478 | */ |
duke@1 | 479 | public void _releaseReply(InputStream input) { |
duke@1 | 480 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 481 | } |
duke@1 | 482 | |
duke@1 | 483 | /** |
duke@1 | 484 | * Throws an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with |
duke@1 | 485 | * the message "This is a locally constrained object." This method |
duke@1 | 486 | * does not apply to local objects and is therefore not implemented. |
duke@1 | 487 | * This method is the default implementation of the |
duke@1 | 488 | * <code>org.omg.CORBA.Object</code> method.<P> |
duke@1 | 489 | * @return NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 490 | * and this method does not apply to local objects |
duke@1 | 491 | * @exception NO_IMPLEMENT because this is a locally constrained object |
duke@1 | 492 | * and this method does not apply to local objects |
duke@1 | 493 | * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package |
duke@1 | 494 | * comments for unimplemented features</a> |
duke@1 | 495 | */ |
duke@1 | 496 | |
duke@1 | 497 | public boolean validate_connection() { |
duke@1 | 498 | throw new org.omg.CORBA.NO_IMPLEMENT(reason); |
duke@1 | 499 | } |
duke@1 | 500 | } |