11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package org.omg.CORBA; 27 import org.omg.CORBA.portable.*; 28 29 30 /** 31 * <P>Used as a base class for implementation of a local IDL interface in the 32 * Java language mapping. It is a class which implements all the operations 33 * in the <tt>org.omg.CORBA.Object</tt> interface. 34 * <P>Local interfaces are implemented by using CORBA::LocalObject 35 * to provide implementations of <code>Object</code> pseudo 36 * operations and any other ORB-specific support mechanisms that are 37 * appropriate for such objects. Object implementation techniques are 38 * inherently language-mapping specific. Therefore, the 39 * <code>LocalObject</code> type is not defined in IDL, but is specified 40 * in each language mapping. 41 * <P>Methods that do not apply to local objects throw 42 * an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with the message, 43 * "This is a locally contrained object." Attempting to use a 44 * <TT>LocalObject</TT> to create a DII request results in NO_IMPLEMENT 45 * system exception. Attempting to marshal or stringify a 46 * <TT>LocalObject</TT> results in a MARSHAL system exception. Narrowing 47 * and widening references to <TT>LocalObjects</TT> must work as for regular 48 * object references. 49 * <P><code>LocalObject</code> is to be used as the base class of locally 50 * constrained objects, such as those in the PortableServer module. 51 * The specification here is based on the CORBA Components 52 * Volume I - orbos/99-07-01<P> 53 * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 54 * comments for unimplemented features</a> 55 */ 56 57 public class LocalObject implements org.omg.CORBA.Object 58 { 59 private static String reason = "This is a locally constrained object."; 60 61 /** 62 * Constructs a default <code>LocalObject</code> instance. 63 */ 64 public LocalObject() {} 65 66 /** 67 * <P>Determines whether the two object references are equivalent, 68 * so far as the ORB can easily determine. Two object references are equivalent 69 * if they are identical. Two distinct object references which in fact refer to 70 * the same object are also equivalent. However, ORBs are not required 71 * to attempt determination of whether two distinct object references 72 * refer to the same object, since such determination could be impractically 73 * expensive. 74 * <P>Default implementation of the org.omg.CORBA.Object method. 75 * 76 * @param that the object reference with which to check for equivalence 77 * @return <code>true</code> if this object reference is known to be 78 * equivalent to the given object reference. 79 * Note that <code>false</code> indicates only that the two 80 * object references are distinct, not necessarily that 81 * they reference distinct objects. 82 */ 83 public boolean _is_equivalent(org.omg.CORBA.Object that) { 84 return equals(that) ; 85 } 86 87 /** | 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 package org.omg.CORBA; 27 import org.omg.CORBA.portable.*; 28 29 30 /** 31 * Used as a base class for implementation of a local IDL interface in the 32 * Java language mapping. It is a class which implements all the operations 33 * in the <tt>org.omg.CORBA.Object</tt> interface. 34 * <P>Local interfaces are implemented by using CORBA::LocalObject 35 * to provide implementations of <code>Object</code> pseudo 36 * operations and any other ORB-specific support mechanisms that are 37 * appropriate for such objects. Object implementation techniques are 38 * inherently language-mapping specific. Therefore, the 39 * <code>LocalObject</code> type is not defined in IDL, but is specified 40 * in each language mapping. 41 * <P>Methods that do not apply to local objects throw 42 * an <code>org.omg.CORBA.NO_IMPLEMENT</code> exception with the message, 43 * "This is a locally contrained object." Attempting to use a 44 * <TT>LocalObject</TT> to create a DII request results in NO_IMPLEMENT 45 * system exception. Attempting to marshal or stringify a 46 * <TT>LocalObject</TT> results in a MARSHAL system exception. Narrowing 47 * and widening references to <TT>LocalObjects</TT> must work as for regular 48 * object references. 49 * <P><code>LocalObject</code> is to be used as the base class of locally 50 * constrained objects, such as those in the PortableServer module. 51 * The specification here is based on the CORBA Components 52 * Volume I - orbos/99-07-01 53 * 54 * @see <a href="package-summary.html#unimpl"><code>CORBA</code> package 55 * comments for unimplemented features</a> 56 */ 57 58 public class LocalObject implements org.omg.CORBA.Object 59 { 60 private static String reason = "This is a locally constrained object."; 61 62 /** 63 * Constructs a default <code>LocalObject</code> instance. 64 */ 65 public LocalObject() {} 66 67 /** 68 * Determines whether the two object references are equivalent, 69 * so far as the ORB can easily determine. Two object references are equivalent 70 * if they are identical. Two distinct object references which in fact refer to 71 * the same object are also equivalent. However, ORBs are not required 72 * to attempt determination of whether two distinct object references 73 * refer to the same object, since such determination could be impractically 74 * expensive. 75 * <P>Default implementation of the org.omg.CORBA.Object method. 76 * 77 * @param that the object reference with which to check for equivalence 78 * @return <code>true</code> if this object reference is known to be 79 * equivalent to the given object reference. 80 * Note that <code>false</code> indicates only that the two 81 * object references are distinct, not necessarily that 82 * they reference distinct objects. 83 */ 84 public boolean _is_equivalent(org.omg.CORBA.Object that) { 85 return equals(that) ; 86 } 87 88 /** |