/** * To stub method * @return the stub object * @param obj Remote object to unexport * @exception NoSuchObjectException if the object is not currently exported */ public Remote toStub(Remote obj) throws NoSuchObjectException { return rmi.toStub(obj); } }
public static void connect(Remote target, Remote source) throws RemoteException { delegate.connect(target, source); }
/** * Export a Remote Object * @param obj Remote object to export * @exception RemoteException exporting remote object problem */ public void exportObject(Remote obj) throws RemoteException { rmi.exportObject(obj); }
pro.exportObject((Remote) o); Remote old = (Remote) addToExported(name, o); if (old != null) { if (replace) { pro.unexportObject(old); } else { pro.unexportObject((Remote) o); addToExported(name, old); throw new NamingException("Object '" + o + "' with name '" + name + "' is already bind"); o = pro.toStub((Remote) o); return o; } else {
} else if ((!(o instanceof Remote)) && (o instanceof Reference)) { IIOPReferenceWrapper irw = new IIOPReferenceWrapper((Reference)o); ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().exportObject(irw); IIOPReferenceWrapper oldObj = (IIOPReferenceWrapper) wrapperHash.put(name, irw); if (oldObj != null) { if (replace) { ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().unexportObject(oldObj); } else { ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().unexportObject(irw); wrapperHash.put(name, oldObj); throw new NamingException("Object already bind"); } else if ((!(o instanceof Remote)) && (o instanceof Serializable)) { IIOPResourceWrapper irw = new IIOPResourceWrapper((Serializable) o); ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().exportObject(irw); IIOPResourceWrapper oldObj = (IIOPResourceWrapper) wrapperHash.put(name, irw); if (oldObj != null) { if (replace) { ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().unexportObject(oldObj); } else { ProtocolCurrent.getCurrent().getCurrentPortableRemoteObject().unexportObject(irw); wrapperHash.put(name, oldObj); throw new NamingException("Object already bind");
/** * Method for unexport object * @param obj Remote obj object to unexport * @exception NoSuchObjectException if the object is not currently exported */ public void unexportObject(Remote obj) throws NoSuchObjectException { rmi.unexportObject(obj); }
public static Object narrow(Object from, Class to) throws ClassCastException { return delegate.narrow(from, to); }
proDelegate.exportObject(wrappedObject); proDelegate.unexportObject(oldObj); } else { proDelegate.unexportObject(wrappedObject); addToExported(name, oldObj); throw new NamingException("Object '" + o + "' with name '" + name + "' is already bind");
public static void unexportObject(Remote obj) throws NoSuchObjectException { rmi.unexportObject(obj); }
/** * Checks to ensure that an object of a remote or abstract interface type * can be cast to a desired type. * @param narrowFrom the object to check. * @param narrowTo the desired type. * @return an object which can be cast to the desired type. * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. */ public static java.lang.Object narrow ( java.lang.Object narrowFrom, java.lang.Class<?> narrowTo) throws ClassCastException { if (proDelegate != null) { return proDelegate.narrow(narrowFrom, narrowTo); } return null; }
proDelegate.exportObject(wrappedObject); Remote oldObj = (Remote) addToExported(name, wrappedObject); if (oldObj != null) { if (replace) { proDelegate.unexportObject(oldObj); } else { proDelegate.unexportObject(wrappedObject); addToExported(name, oldObj); throw new NamingException("Object '" + o + "' with name '" + name + "' is already bind");
public static Remote toStub(Remote o) throws NoSuchObjectException { return delegate.toStub(o); }
/** * Deregisters a server object from the runtime, allowing the object to become * available for garbage collection. * @param obj the object to unexport. * @exception NoSuchObjectException if the remote object is not * currently exported. */ public static void unexportObject(Remote obj) throws NoSuchObjectException { if (proDelegate != null) { proDelegate.unexportObject(obj); } }
/** * Makes a server object ready to receive remote calls. Note * that subclasses of PortableRemoteObject do not need to call this * method, as it is called by the constructor. * @param obj the server object to export. * @exception RemoteException if export fails. */ public static void exportObject(Remote obj) throws RemoteException { // Let the delegate do everything, including error handling. if (proDelegate != null) { proDelegate.exportObject(obj); } }
/** * Checks to ensure that an object of a remote or abstract interface type can be cast to a desired type. * * @param narrowFrom * the object to check. * @param narrowTo * the desired type. * @return an object which can be cast to the desired type. * @throws ClassCastException * if narrowFrom cannot be cast to narrowTo. */ public static java.lang.Object narrow(java.lang.Object narrowFrom, java.lang.Class<?> narrowTo) throws ClassCastException { if (proDelegate != null) { return proDelegate.narrow(narrowFrom, narrowTo); } return null; }
/** * Makes a Remote object ready for remote communication. This normally happens implicitly when the object is sent or * received as an argument on a remote method call, but in some circumstances it is useful to perform this action by * making an explicit call. See the {@link javax.rmi.CORBA.Stub#connect} method for more information. * * @param target * the object to connect. * @param source * a previously connected object. * @throws RemoteException * if <code>source</code> is not connected or if <code>target</code> is already connected to a different * ORB than <code>source</code>. */ public static void connect(Remote target, Remote source) throws RemoteException { if (proDelegate != null) { proDelegate.connect(target, source); } }
proDelegate.exportObject(irw); proDelegate.unexportObject(oldObj); } else { proDelegate.unexportObject(irw); addToExported(name, oldObj); throw new NamingException("Object '" + o + "' with name '" + name + "' is already bind");
public static Remote toStub(Remote obj) throws NoSuchObjectException { return rmi.toStub(obj); }
public static void unexportObject(Remote o) throws NoSuchObjectException { delegate.unexportObject(o); } }
public static void exportObject(Remote obj) throws RemoteException { rmi.exportObject(obj); }