/** * Converts the return value of a local invocation into the expected type. * A conversion is needed if the return value is a remote interface * (in this case <code>PortableRemoteObject.narrow()</code> must be called). * * @param obj the return value to be converted * @return the converted value. */ public Object convertLocalRetval(Object obj) { if (retvalRemoteInterface == null) return obj; else return PortableRemoteObject.narrow(obj, retvalRemoteInterface); }
/** * Marshals the sequence of method parameters into an output stream. * * @param out a CDR output stream * @param params an object array with the parameters. */ public void writeParams(OutputStream out, Object[] params) { int len = params.length; if (len != paramWriters.length) { throw IIOPLogger.ROOT_LOGGER.errorMashalingParams(); } for (int i = 0; i < len; i++) { Object param = params[i]; if (param instanceof PortableRemoteObject) { try { param = PortableRemoteObject.toStub((Remote) param); } catch (NoSuchObjectException e) { throw new RuntimeException(e); } } paramWriters[i].write(out, RemoteObjectSubstitutionManager.writeReplaceRemote(param)); } }
/** * Initializes the object by calling <code>exportObject(this)</code>. * @exception RemoteException if export fails. */ protected PortableRemoteObject() throws RemoteException { if (proDelegate != null) { PortableRemoteObject.exportObject((Remote)this); } }
public void unexportObject(Remote remote) throws RemoteException { //PortableRemoteObjectExt.pushState(this); try { javax.rmi.PortableRemoteObject.unexportObject(remote); } finally { //PortableRemoteObjectExt.popState(); } }
public Object read(InputStream in) { // The narrow() call downloads the stub from the codebase embedded // within the IOR of the unmarshalled object. return PortableRemoteObject.narrow(in.read_Object(), clz); } }
public void exportObject(Remote remote) throws RemoteException { //PortableRemoteObjectExt.pushState(this); try { javax.rmi.PortableRemoteObject.exportObject(remote); } finally { //PortableRemoteObjectExt.popState(); } }
java.rmi.Remote getStub(java.rmi.Remote remote) throws java.rmi.RemoteException { return PortableRemoteObject.toStub(remote); } }
public EJBHome readEJBHome(final ObjectInputStream oistream) throws IOException, ClassNotFoundException { final Object ejbHome = proxy.read(oistream); reconnect(ejbHome); return (EJBHome) PortableRemoteObject.narrow(ejbHome, EJBHome.class); }
protected PortableRemoteObject() throws RemoteException { // Register object exportObject((Remote)this); }
java.rmi.Remote getStub(java.rmi.Remote remote) throws java.rmi.RemoteException { return PortableRemoteObject.toStub(remote); } }
public EJBObject readEJBObject(final ObjectInputStream oistream) throws IOException, ClassNotFoundException { final Object ejbObject = proxy.read(oistream); reconnect(ejbObject); return (EJBObject) PortableRemoteObject.narrow(ejbObject, EJBObject.class); }
/** * Initializes the object by calling <code>exportObject(this)</code>. * * @exception RemoteException * if export fails. */ protected PortableRemoteObject() throws RemoteException { if (proDelegate != null) { PortableRemoteObject.exportObject((Remote) this); } }
/** * Initializes the object by calling <code>exportObject(this)</code>. * * @exception RemoteException * if export fails. */ protected PortableRemoteObject() throws RemoteException { if (proDelegate != null) { PortableRemoteObject.exportObject((Remote) this); } }
/** * From javax.rmi.PortableRemoteObject. */ public static Object portableRemoteObject_narrow(Object narrowFrom, Class narrowTo) throws ClassCastException { return javax.rmi.PortableRemoteObject.narrow(narrowFrom, narrowTo); }
/** * Utility method for narrowing portable object to a class */ public final static Object narrow(Object o, Class classType) { return PortableRemoteObject.narrow(o, classType); } }
/** * Utility method for narrowing portable object to a class */ public final static Object narrow(Object o, Class classType) { return PortableRemoteObject.narrow(o, classType); } }
/** * Converts the return value of a local invocation into the expected type. * A conversion is needed if the return value is a remote interface * (in this case <code>PortableRemoteObject.narrow()</code> must be called). * * @param obj the return value to be converted * @return the converted value. */ public Object convertLocalRetval(Object obj) { if (retvalRemoteInterface == null) return obj; else return PortableRemoteObject.narrow(obj, retvalRemoteInterface); }
protected Object cast(final Object object, final Class type) { return PortableRemoteObject.narrow(object, type); }
ejbHome = (EJBHome) PortableRemoteObject.narrow(corbaRef, EJBHome.class);