325N/A * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved. 325N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 325N/A * This code is free software; you can redistribute it and/or modify it 325N/A * under the terms of the GNU General Public License version 2 only, as 325N/A * published by the Free Software Foundation. Oracle designates this 325N/A * particular file as subject to the "Classpath" exception as provided 325N/A * by Oracle in the LICENSE file that accompanied this code. 325N/A * This code is distributed in the hope that it will be useful, but WITHOUT 325N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 325N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 325N/A * version 2 for more details (a copy is included in the LICENSE file that 325N/A * accompanied this code). 325N/A * You should have received a copy of the GNU General Public License version 325N/A * 2 along with this work; if not, write to the Free Software Foundation, 325N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 325N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 325N/A * or visit www.oracle.com if you need additional information or have any 325N/A * Licensed Materials - Property of IBM 325N/A * Copyright IBM Corp. 1998 1999 All Rights Reserved 325N/A * Server implementation objects may either inherit from 325N/A * javax.rmi.PortableRemoteObject or they may implement a remote interface 325N/A * and then use the exportObject method to register themselves as a server object. 325N/A * The toStub method takes a server implementation and returns a stub that 325N/A * can be used to access that server object. 325N/A * The connect method makes a Remote object ready for remote communication. 325N/A * The unexportObject method is used to deregister a server object, allowing it to become 325N/A * available for garbage collection. 325N/A * The narrow method takes an object reference or abstract interface type and 325N/A * attempts to narrow it to conform to 325N/A * the given interface. If the operation is successful the result will be an 325N/A * object of the specified type, otherwise an exception will be thrown. 325N/A "javax.rmi.CORBA.PortableRemoteObjectClass";
325N/A * Initializes the object by calling <code>exportObject(this)</code>. 325N/A * @exception RemoteException if export fails. 325N/A * Makes a server object ready to receive remote calls. Note 325N/A * that subclasses of PortableRemoteObject do not need to call this 325N/A * method, as it is called by the constructor. 325N/A * @param obj the server object to export. 325N/A * @exception RemoteException if export fails. 325N/A // Let the delegate do everything, including error handling. 325N/A * Returns a stub for the given server object. 325N/A * @param obj the server object for which a stub is required. Must either be a subclass 325N/A * of PortableRemoteObject or have been previously the target of a call to 325N/A * {@link #exportObject}. 325N/A * @return the most derived stub for the object. 325N/A * @exception NoSuchObjectException if a stub cannot be located for the given server object. 325N/A * Deregisters a server object from the runtime, allowing the object to become 325N/A * available for garbage collection. 325N/A * @param obj the object to unexport. 325N/A * @exception NoSuchObjectException if the remote object is not 325N/A * Checks to ensure that an object of a remote or abstract interface type 325N/A * can be cast to a desired type. 325N/A * @param narrowFrom the object to check. 325N/A * @param narrowTo the desired type. 325N/A * @return an object which can be cast to the desired type. 325N/A * @throws ClassCastException if narrowFrom cannot be cast to narrowTo. 325N/A * Makes a Remote object ready for remote communication. This normally 325N/A * happens implicitly when the object is sent or received as an argument 325N/A * on a remote method call, but in some circumstances it is useful to 325N/A * perform this action by making an explicit call. See the 325N/A * {@link javax.rmi.CORBA.Stub#connect} method for more information. 325N/A * @param target the object to connect. 325N/A * @param source a previously connected object. 325N/A * @throws RemoteException if <code>source</code> is not connected 325N/A * or if <code>target</code> is already connected to a different ORB than 325N/A // Same code as in javax.rmi.CORBA.Util. Can not be shared because they 325N/A // are in different packages and the visibility needs to be package for 325N/A // security reasons. If you know a better solution how to share this code 325N/A // then remove it from here. 325N/A // ignore, then try RMIClassLoader // This will not throw a SecurityException because this // class was loaded from rt.jar using the bootstrap classloader.