1 7 8 package com.sun.corba.se.impl.protocol; 9 10 import javax.rmi.CORBA.Tie ; 11 12 import org.omg.CORBA.portable.ServantObject ; 13 14 import com.sun.corba.se.spi.orb.ORB ; 15 16 import com.sun.corba.se.spi.protocol.LocalClientRequestDispatcherFactory ; 17 import com.sun.corba.se.spi.protocol.LocalClientRequestDispatcher ; 18 19 import com.sun.corba.se.spi.ior.IOR ; 20 21 import com.sun.corba.se.impl.protocol.LocalClientRequestDispatcherBase ; 22 23 import com.sun.corba.se.pept.broker.Broker; 24 25 public class JIDLLocalCRDImpl extends LocalClientRequestDispatcherBase 26 { 27 public JIDLLocalCRDImpl( ORB orb, int scid, IOR ior ) 28 { 29 super( (com.sun.corba.se.spi.orb.ORB)orb, scid, ior ) ; 30 } 31 32 protected ServantObject servant; 33 34 public ServantObject servant_preinvoke(org.omg.CORBA.Object self, 35 String operation, 36 Class expectedType) 37 { 38 if (!checkForCompatibleServant( servant, expectedType )) 39 return null ; 40 41 return servant; 42 } 43 44 public void servant_postinvoke( org.omg.CORBA.Object self, 45 ServantObject servant ) 46 { 47 } 49 50 public void setServant( java.lang.Object servant ) 52 { 53 if (servant != null && servant instanceof Tie ) { 54 this.servant = new ServantObject (); 55 this.servant.servant = ((Tie )servant).getTarget(); 56 } else { 57 this.servant = null; 58 } 59 } 60 61 public void unexport() { 62 servant = null; 69 } 70 } 71 72 | Popular Tags |