src/share/classes/org/omg/PortableServer/POAHelper.java

Wed, 26 Feb 2014 14:43:56 -0800

author
katleman
date
Wed, 26 Feb 2014 14:43:56 -0800
changeset 589
abe5b0157c36
parent 158
91006f157c46
child 748
6845b95cba6b
permissions
-rw-r--r--

Added tag jdk8u20-b03 for changeset 9059a1c85704

     1 /*
     2  * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     8  * particular file as subject to the "Classpath" exception as provided
     9  * by Oracle in the LICENSE file that accompanied this code.
    10  *
    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  */
    26 package org.omg.PortableServer;
    28 /**
    29 * org/omg/PortableServer/POAHelper.java .
    30 * Generated by the IDL-to-Java compiler (portable), version "3.1"
    31 * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
    32 * Tuesday, October 23, 2001 1:16:58 PM PDT
    33 */
    36 /**
    37  * A POA object manages the implementation of a
    38  * collection of objects. The POA supports a name space
    39  * for the objects, which are identified by Object Ids.
    40  * A POA also provides a name space for POAs. A POA is
    41  * created as a child of an existing POA, which forms a
    42  * hierarchy starting with the root POA. A POA object
    43  * must not be exported to other processes, or
    44  * externalized with ORB::object_to_string.
    45  */
    46 abstract public class POAHelper
    47 {
    48     private static String  _id = "IDL:omg.org/PortableServer/POA:2.3";
    50     public static void insert (org.omg.CORBA.Any a,
    51         org.omg.PortableServer.POA that)
    52     {
    53         org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
    54         a.type (type ());
    55         write (out, that);
    56         a.read_value (out.create_input_stream (), type ());
    57     }
    59     public static org.omg.PortableServer.POA extract (org.omg.CORBA.Any a)
    60     {
    61         return read (a.create_input_stream ());
    62     }
    64     private static org.omg.CORBA.TypeCode __typeCode = null;
    65     synchronized public static org.omg.CORBA.TypeCode type ()
    66     {
    67         if (__typeCode == null)
    68         {
    69             __typeCode = org.omg.CORBA.ORB.init ().create_interface_tc (org.omg.PortableServer.POAHelper.id (), "POA");
    70         }
    71         return __typeCode;
    72     }
    74     public static String id ()
    75     {
    76         return _id;
    77     }
    79     public static org.omg.PortableServer.POA read (
    80         org.omg.CORBA.portable.InputStream istream)
    81     {
    82         throw new org.omg.CORBA.MARSHAL ();
    83     }
    85     public static void write (org.omg.CORBA.portable.OutputStream ostream,
    86        org.omg.PortableServer.POA value)
    87     {
    88         throw new org.omg.CORBA.MARSHAL ();
    89     }
    91     public static org.omg.PortableServer.POA narrow (org.omg.CORBA.Object obj)
    92     {
    93        if (obj == null)
    94            return null;
    95        else if (obj instanceof org.omg.PortableServer.POA)
    96            return (org.omg.PortableServer.POA)obj;
    97        else if (!obj._is_a (id ()))
    98           throw new org.omg.CORBA.BAD_PARAM ();
    99        return null;
   100     }
   101 }

mercurial