1 28 package org.objectweb.carol.rmi.jrmp.server; 29 30 import java.io.ObjectInput ; 32 import java.rmi.RemoteException ; 33 import java.rmi.UnmarshalException ; 34 import java.rmi.server.ObjID ; 35 36 import org.objectweb.carol.rmi.jrmp.interceptor.JClientInterceptorHelper; 37 import org.objectweb.carol.rmi.jrmp.interceptor.JClientRequestInterceptor; 38 39 import sun.rmi.transport.Connection; 40 import sun.rmi.transport.StreamRemoteCall; 41 42 48 public class JRemoteCall extends StreamRemoteCall { 49 50 53 protected JClientRequestInterceptor[] cis = null; 54 55 62 public JRemoteCall(Connection c, ObjID id, int op, long hash, JClientRequestInterceptor[] cis) 63 throws RemoteException { 64 super(c, id, op, hash); 65 this.cis = cis; 66 } 67 68 73 public void executeCall() throws Exception { 74 try { 75 super.executeCall(); 76 } catch (Exception e) { 77 if (e.getMessage().equals("dummy")) { 79 ObjectInput in = getInputStream(); 80 JClientInterceptorHelper.receive_exception(in, cis); 81 Object ex; 82 try { 83 ex = in.readObject(); 84 } catch (Exception exc) { 85 throw new UnmarshalException ("Error unmarshaling return", exc); 86 } 87 if (ex instanceof Exception ) { 88 exceptionReceivedFromServer((Exception ) ex); 90 } else { 91 throw new UnmarshalException ("Return type not Exception"); 92 } 93 } else { 94 throw e; 98 } 99 } 100 ObjectInput in = getInputStream(); 101 JClientInterceptorHelper.receive_reply(in, cis); 102 } 103 } | Popular Tags |