1 7 package org.omg.CORBA.portable; 8 9 import org.omg.CORBA.Request ; 10 import org.omg.CORBA.NamedValue ; 11 import org.omg.CORBA.NVList ; 12 import org.omg.CORBA.ExceptionList ; 13 import org.omg.CORBA.ContextList ; 14 import org.omg.CORBA.Context ; 15 import org.omg.CORBA.TypeCode ; 16 import org.omg.CORBA.BAD_OPERATION ; 17 import org.omg.CORBA.SystemException ; 18 19 20 27 28 abstract public class ObjectImpl implements org.omg.CORBA.Object 29 { 30 31 39 private transient Delegate __delegate; 40 41 42 51 public Delegate _get_delegate() { 52 if (__delegate == null) 53 throw new BAD_OPERATION ("The delegate has not been set!"); 54 return __delegate; 55 } 56 57 58 68 public void _set_delegate(Delegate delegate) { 69 __delegate = delegate; 70 } 71 72 81 public abstract String [] _ids(); 82 83 84 90 public org.omg.CORBA.Object _duplicate() { 91 return _get_delegate().duplicate(this); 92 } 93 94 97 public void _release() { 98 _get_delegate().release(this); 99 } 100 101 111 public boolean _is_a(String repository_id) { 112 return _get_delegate().is_a(this, repository_id); 113 } 114 115 125 public boolean _is_equivalent(org.omg.CORBA.Object that) { 126 return _get_delegate().is_equivalent(this, that); 127 } 128 129 136 public boolean _non_existent() { 137 return _get_delegate().non_existent(this); 138 } 139 140 149 public int _hash(int maximum) { 150 return _get_delegate().hash(this, maximum); 151 } 152 153 162 public Request _request(String operation) { 163 return _get_delegate().request(this, operation); 164 } 165 166 181 public Request _create_request(Context ctx, 182 String operation, 183 NVList arg_list, 184 NamedValue result) { 185 return _get_delegate().create_request(this, 186 ctx, 187 operation, 188 arg_list, 189 result); 190 } 191 192 220 public Request _create_request(Context ctx, 221 String operation, 222 NVList arg_list, 223 NamedValue result, 224 ExceptionList exceptions, 225 ContextList contexts) { 226 return _get_delegate().create_request(this, 227 ctx, 228 operation, 229 arg_list, 230 result, 231 exceptions, 232 contexts); 233 } 234 235 242 public org.omg.CORBA.Object _get_interface_def() 243 { 244 250 org.omg.CORBA.portable.Delegate delegate = _get_delegate(); 251 try { 252 return delegate.get_interface_def(this); 256 } 257 catch( org.omg.CORBA.NO_IMPLEMENT ex ) { 258 try { 260 Class [] argc = { org.omg.CORBA.Object .class }; 261 java.lang.reflect.Method meth = 262 delegate.getClass().getMethod("get_interface", argc); 263 Object [] argx = { this }; 264 return (org.omg.CORBA.Object )meth.invoke(delegate, argx); 265 } 266 catch( java.lang.reflect.InvocationTargetException exs ) { 267 Throwable t = exs.getTargetException(); 268 if (t instanceof Error ) { 269 throw (Error ) t; 270 } 271 else if (t instanceof RuntimeException ) { 272 throw (RuntimeException ) t; 273 } 274 else { 275 throw new org.omg.CORBA.NO_IMPLEMENT (); 276 } 277 } catch( RuntimeException rex ) { 278 throw rex; 279 } catch( Exception exr ) { 280 throw new org.omg.CORBA.NO_IMPLEMENT (); 281 } 282 } 283 } 284 285 294 public org.omg.CORBA.ORB _orb() { 295 return _get_delegate().orb(this); 296 } 297 298 299 309 public org.omg.CORBA.Policy _get_policy(int policy_type) { 310 return _get_delegate().get_policy(this, policy_type); 311 } 312 313 320 public org.omg.CORBA.DomainManager [] _get_domain_managers() { 321 return _get_delegate().get_domain_managers(this); 322 } 323 324 339 public org.omg.CORBA.Object 340 _set_policy_override(org.omg.CORBA.Policy [] policies, 341 org.omg.CORBA.SetOverrideType set_add) { 342 return _get_delegate().set_policy_override(this, policies, 343 set_add); 344 } 345 346 353 public boolean _is_local() { 354 return _get_delegate().is_local(this); 355 } 356 357 389 public ServantObject _servant_preinvoke(String operation, 390 Class expectedType) { 391 return _get_delegate().servant_preinvoke(this, operation, 392 expectedType); 393 } 394 395 409 public void _servant_postinvoke(ServantObject servant) { 410 _get_delegate().servant_postinvoke(this, servant); 411 } 412 413 417 418 429 public OutputStream _request(String operation, 430 boolean responseExpected) { 431 return _get_delegate().request(this, operation, responseExpected); 432 } 433 434 455 public InputStream _invoke(OutputStream output) 456 throws ApplicationException , RemarshalException { 457 return _get_delegate().invoke(this, output); 458 } 459 460 473 public void _releaseReply(InputStream input) { 474 _get_delegate().releaseReply(this, input); 475 } 476 477 483 public String toString() { 484 if ( __delegate != null ) 485 return __delegate.toString(this); 486 else 487 return getClass().getName() + ": no delegate set"; 488 } 489 490 495 public int hashCode() { 496 if ( __delegate != null ) 497 return __delegate.hashCode(this); 498 else 499 return System.identityHashCode(this); 500 } 501 502 510 public boolean equals(java.lang.Object obj) { 511 if ( __delegate != null ) 512 return __delegate.equals(this, obj); 513 else 514 return (this==obj); 515 } 516 } 517 518 | Popular Tags |