0N/A/*
157N/A * Copyright (c) 1999, 2001, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
157N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
157N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
157N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
157N/A * or visit www.oracle.com if you need additional information or have any
157N/A * questions.
0N/A */
0N/Apackage org.omg.CORBA;
0N/A
0N/A
0N/A/**
0N/A* The Stub for <tt>Policy</tt>. For more information on
0N/A* Stub files, see <a href="doc-files/generatedfiles.html#stub">
0N/A* "Generated Files: Stubs"</a>.<P>
0N/A* org/omg/CORBA/_PolicyStub.java
0N/A* Generated by the IDL-to-Java compiler (portable), version "3.0"
0N/A* from ../../../../../src/share/classes/org/omg/PortableServer/corba.idl.
0N/A* Saturday, July 17, 1999 12:26:20 AM PDT
0N/A*/
0N/A
0N/Apublic class _PolicyStub extends org.omg.CORBA.portable.ObjectImpl implements org.omg.CORBA.Policy
0N/A{
0N/A /** Constructors
0N/A * NOTE: If the default constructor is used, the
0N/A * object is useless until _set_delegate (...)
0N/A * is called.
0N/A */
0N/A public _PolicyStub ()
0N/A {
0N/A super ();
0N/A }
0N/A
0N/A /** Constructs a <code>_PolicyStub</code> object initialized
0N/A * with the given <code>Delegate</code> object.
0N/A *
0N/A * @param delegate a Delegate Object
0N/A */
0N/A public _PolicyStub (org.omg.CORBA.portable.Delegate delegate)
0N/A {
0N/A super ();
0N/A _set_delegate (delegate);
0N/A }
0N/A
0N/A
0N/A /** Returns the constant value that corresponds to the
0N/A * type of the policy object. The values of
0N/A * the polivy objectys are allocated by the OMG.
0N/A * New values for PolicyType should be obtained from the OMG by
0N/A * sending mail to request@omg.org. In general the constant
0N/A * values that are allocated are defined in conjunction with
0N/A * the definition of the corresponding policy object.
0N/A * @return the constant value that corresponds to the type of
0N/A * the policy object.
0N/A */
0N/A public int policy_type ()
0N/A {
0N/A org.omg.CORBA.portable.InputStream _in = null;
0N/A try {
0N/A org.omg.CORBA.portable.OutputStream _out = _request ("_get_policy_type", true);
0N/A _in = _invoke (_out);
0N/A int __result = org.omg.CORBA.PolicyTypeHelper.read (_in);
0N/A return __result;
0N/A } catch (org.omg.CORBA.portable.ApplicationException _ex) {
0N/A _in = _ex.getInputStream ();
0N/A String _id = _ex.getId ();
0N/A throw new org.omg.CORBA.MARSHAL (_id);
0N/A } catch (org.omg.CORBA.portable.RemarshalException _rm) {
0N/A return policy_type ();
0N/A } finally {
0N/A _releaseReply (_in);
0N/A }
0N/A } // policy_type
0N/A
0N/A
0N/A /** Copies the policy object. The copy does not retain any
0N/A * relationships that the policy had with any domain or object.
0N/A * @return the copy of the policy object.
0N/A */
0N/A public org.omg.CORBA.Policy copy ()
0N/A {
0N/A org.omg.CORBA.portable.InputStream _in = null;
0N/A try {
0N/A org.omg.CORBA.portable.OutputStream _out = _request ("copy", true);
0N/A _in = _invoke (_out);
0N/A org.omg.CORBA.Policy __result = org.omg.CORBA.PolicyHelper.read (_in);
0N/A return __result;
0N/A } catch (org.omg.CORBA.portable.ApplicationException _ex) {
0N/A _in = _ex.getInputStream ();
0N/A String _id = _ex.getId ();
0N/A throw new org.omg.CORBA.MARSHAL (_id);
0N/A } catch (org.omg.CORBA.portable.RemarshalException _rm) {
0N/A return copy ();
0N/A } finally {
0N/A _releaseReply (_in);
0N/A }
0N/A } // copy
0N/A
0N/A
0N/A /** Destroys the policy object. It is the responsibility of
0N/A * the policy object to determine whether it can be destroyed.
0N/A */
0N/A public void destroy ()
0N/A {
0N/A org.omg.CORBA.portable.InputStream _in = null;
0N/A try {
0N/A org.omg.CORBA.portable.OutputStream _out = _request ("destroy", true);
0N/A _in = _invoke (_out);
0N/A } catch (org.omg.CORBA.portable.ApplicationException _ex) {
0N/A _in = _ex.getInputStream ();
0N/A String _id = _ex.getId ();
0N/A throw new org.omg.CORBA.MARSHAL (_id);
0N/A } catch (org.omg.CORBA.portable.RemarshalException _rm) {
0N/A destroy ();
0N/A } finally {
0N/A _releaseReply (_in);
0N/A }
0N/A } // destroy
0N/A
0N/A // Type-specific CORBA::Object operations
0N/A private static String[] __ids = {
0N/A "IDL:omg.org/CORBA/Policy:1.0"};
0N/A
0N/A public String[] _ids ()
0N/A {
0N/A return (String[])__ids.clone ();
0N/A }
0N/A
0N/A private void readObject (java.io.ObjectInputStream s)
0N/A {
0N/A try
0N/A {
0N/A String str = s.readUTF ();
0N/A org.omg.CORBA.Object obj = org.omg.CORBA.ORB.init ().string_to_object (str);
0N/A org.omg.CORBA.portable.Delegate delegate = ((org.omg.CORBA.portable.ObjectImpl) obj)._get_delegate ();
0N/A _set_delegate (delegate);
0N/A } catch (java.io.IOException e) {}
0N/A }
0N/A
0N/A private void writeObject (java.io.ObjectOutputStream s)
0N/A {
0N/A try
0N/A {
0N/A String str = org.omg.CORBA.ORB.init ().object_to_string (this);
0N/A s.writeUTF (str);
0N/A } catch (java.io.IOException e) {}
0N/A }
0N/A} // class _PolicyStub