1 7 8 package com.sun.corba.se.spi.protocol; 9 10 import org.omg.CORBA.BAD_PARAM ; 11 12 import com.sun.corba.se.impl.orbutil.ORBUtility ; 13 14 import com.sun.corba.se.spi.ior.IOR ; 15 16 import com.sun.corba.se.spi.orb.ORB ; 17 18 21 public class ForwardException extends RuntimeException { 22 private ORB orb ; 23 private org.omg.CORBA.Object obj; 24 private IOR ior ; 25 26 public ForwardException( ORB orb, IOR ior ) { 27 super(); 28 29 this.orb = orb ; 30 this.obj = null ; 31 this.ior = ior ; 32 } 33 34 public ForwardException( ORB orb, org.omg.CORBA.Object obj) { 35 super(); 36 37 if (obj instanceof org.omg.CORBA.LocalObject ) 42 throw new BAD_PARAM () ; 43 44 this.orb = orb ; 45 this.obj = obj ; 46 this.ior = null ; 47 } 48 49 public synchronized org.omg.CORBA.Object getObject() 50 { 51 if (obj == null) { 52 obj = ORBUtility.makeObjectReference( ior ) ; 53 } 54 55 return obj ; 56 } 57 58 public synchronized IOR getIOR() 59 { 60 if (ior == null) { 61 ior = ORBUtility.getIOR( obj ) ; 62 } 63 64 return ior ; 65 } 66 } 67 | Popular Tags |