KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > iiop > AlternateIIOPAddressComponentHelper


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /**
25 * AlternateIIOPAddressComponent.java .
26 * Generated by the IDL-to-Java compiler (portable), version "3.1"
27 * from iorintsockfact.idl and then modified by hand for package
28 * name and _id.
29 * Tuesday, July 23, 2002 11:08:46 AM PDT
30 */

31
32 package com.sun.enterprise.iiop;
33
34
35 abstract public class AlternateIIOPAddressComponentHelper
36 {
37   private static String JavaDoc _id = "IDL:com/sun/enterprise/iiop/AlternateIIOPAddressComponent:1.0";
38
39   public static void insert (org.omg.CORBA.Any JavaDoc a, com.sun.enterprise.iiop.AlternateIIOPAddressComponent that)
40   {
41     org.omg.CORBA.portable.OutputStream JavaDoc out = a.create_output_stream ();
42     a.type (type ());
43     write (out, that);
44     a.read_value (out.create_input_stream (), type ());
45   }
46
47   public static com.sun.enterprise.iiop.AlternateIIOPAddressComponent extract (org.omg.CORBA.Any JavaDoc a)
48   {
49     return read (a.create_input_stream ());
50   }
51
52   private static org.omg.CORBA.TypeCode JavaDoc __typeCode = null;
53   private static boolean __active = false;
54   synchronized public static org.omg.CORBA.TypeCode JavaDoc type ()
55   {
56     if (__typeCode == null)
57     {
58       synchronized (org.omg.CORBA.TypeCode JavaDoc.class)
59       {
60         if (__typeCode == null)
61         {
62           if (__active)
63           {
64             return org.omg.CORBA.ORB.init().create_recursive_tc ( _id );
65           }
66           __active = true;
67           org.omg.CORBA.StructMember JavaDoc[] _members0 = new org.omg.CORBA.StructMember JavaDoc [2];
68           org.omg.CORBA.TypeCode JavaDoc _tcOf_members0 = null;
69           _tcOf_members0 = org.omg.CORBA.ORB.init ().create_string_tc (0);
70           _members0[0] = new org.omg.CORBA.StructMember JavaDoc (
71             "host",
72             _tcOf_members0,
73             null);
74           _tcOf_members0 = org.omg.CORBA.ORB.init ().get_primitive_tc (org.omg.CORBA.TCKind.tk_short);
75           _members0[1] = new org.omg.CORBA.StructMember JavaDoc (
76             "port",
77             _tcOf_members0,
78             null);
79           __typeCode = org.omg.CORBA.ORB.init ().create_struct_tc (com.sun.enterprise.iiop.AlternateIIOPAddressComponentHelper.id (), "AlternateIIOPAddressComponent", _members0);
80           __active = false;
81         }
82       }
83     }
84     return __typeCode;
85   }
86
87   public static String JavaDoc id ()
88   {
89     return _id;
90   }
91
92   public static com.sun.enterprise.iiop.AlternateIIOPAddressComponent read (org.omg.CORBA.portable.InputStream JavaDoc istream)
93   {
94     com.sun.enterprise.iiop.AlternateIIOPAddressComponent value = new com.sun.enterprise.iiop.AlternateIIOPAddressComponent ();
95     value.host = istream.read_string ();
96     value.port = istream.read_short ();
97     return value;
98   }
99
100   public static void write (org.omg.CORBA.portable.OutputStream JavaDoc ostream, com.sun.enterprise.iiop.AlternateIIOPAddressComponent value)
101   {
102     ostream.write_string (value.host);
103     ostream.write_short (value.port);
104   }
105
106 }
107
Popular Tags