1 28 package org.objectweb.carol.rmi.multi; 29 30 import java.rmi.NoSuchObjectException ; 31 import java.rmi.Remote ; 32 import java.rmi.RemoteException ; 33 34 import javax.rmi.CORBA.PortableRemoteObjectDelegate ; 35 36 40 public class DummyPRODelegate implements PortableRemoteObjectDelegate { 41 42 47 public void exportObject(Remote obj) throws RemoteException { 48 49 } 50 51 56 public void unexportObject(Remote obj) throws NoSuchObjectException { 57 58 } 59 60 66 public void connect(Remote target, Remote source) throws RemoteException { 67 68 } 69 70 78 public Object narrow(Object obj, Class newClass) throws ClassCastException { 79 if (newClass.isAssignableFrom(obj.getClass())) { 80 return obj; 81 } else { 82 throw new ClassCastException ("Can't cast " + obj.getClass().getName() + " in " + newClass.getName()); 83 } 84 } 85 86 92 public Remote toStub(Remote obj) throws NoSuchObjectException { 93 return obj; 94 } 95 } | Popular Tags |