ServiceDetailHelper.java revision 704:3ef63dbde965
1321936Shselasky/* 2321936Shselasky * Copyright (c) 1998, 2001, Oracle and/or its affiliates. All rights reserved. 3321936Shselasky * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4321936Shselasky * 5321936Shselasky * This code is free software; you can redistribute it and/or modify it 6321936Shselasky * under the terms of the GNU General Public License version 2 only, as 7321936Shselasky * published by the Free Software Foundation. Oracle designates this 8321936Shselasky * particular file as subject to the "Classpath" exception as provided 9321936Shselasky * by Oracle in the LICENSE file that accompanied this code. 10321936Shselasky * 11321936Shselasky * This code is distributed in the hope that it will be useful, but WITHOUT 12321936Shselasky * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13321936Shselasky * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14321936Shselasky * version 2 for more details (a copy is included in the LICENSE file that 15321936Shselasky * accompanied this code). 16321936Shselasky * 17321936Shselasky * You should have received a copy of the GNU General Public License version 18321936Shselasky * 2 along with this work; if not, write to the Free Software Foundation, 19321936Shselasky * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20321936Shselasky * 21321936Shselasky * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22321936Shselasky * or visit www.oracle.com if you need additional information or have any 23321936Shselasky * questions. 24321936Shselasky */ 25321936Shselasky 26321936Shselasky /** 27321936Shselasky * The Helper for {@code ServiceDetail}. For more information on 28321936Shselasky * Helper files, see <a href="doc-files/generatedfiles.html#helper"> 29321936Shselasky * "Generated Files: Helper Files"</a>.<P> 30321936Shselasky */ 31321936Shselasky 32321936Shselaskypackage org.omg.CORBA; 33321936Shselasky 34321936Shselasky 35321936Shselaskypublic abstract class ServiceDetailHelper { 36321936Shselasky 37321936Shselasky public static void write(org.omg.CORBA.portable.OutputStream out, org.omg.CORBA.ServiceDetail that) { 38321936Shselasky out.write_ulong(that.service_detail_type); 39321936Shselasky { 40321936Shselasky out.write_long(that.service_detail.length); 41321936Shselasky out.write_octet_array(that.service_detail, 0, that.service_detail.length); 42321936Shselasky } 43321936Shselasky } 44321936Shselasky public static org.omg.CORBA.ServiceDetail read(org.omg.CORBA.portable.InputStream in) { 45321936Shselasky org.omg.CORBA.ServiceDetail that = new org.omg.CORBA.ServiceDetail(); 46321936Shselasky that.service_detail_type = in.read_ulong(); 47321936Shselasky { 48321936Shselasky int __length = in.read_long(); 49321936Shselasky that.service_detail = new byte[__length]; 50321936Shselasky in.read_octet_array(that.service_detail, 0, that.service_detail.length); 51321936Shselasky } 52321936Shselasky return that; 53321936Shselasky } 54321936Shselasky public static org.omg.CORBA.ServiceDetail extract(org.omg.CORBA.Any a) { 55321936Shselasky org.omg.CORBA.portable.InputStream in = a.create_input_stream(); 56321936Shselasky return read(in); 57321936Shselasky } 58321936Shselasky public static void insert(org.omg.CORBA.Any a, org.omg.CORBA.ServiceDetail that) { 59321936Shselasky org.omg.CORBA.portable.OutputStream out = a.create_output_stream(); 60321936Shselasky write(out, that); 61321936Shselasky a.read_value(out.create_input_stream(), type()); 62321936Shselasky } 63321936Shselasky private static org.omg.CORBA.TypeCode _tc; 64321936Shselasky synchronized public static org.omg.CORBA.TypeCode type() { 65321936Shselasky int _memberCount = 2; 66321936Shselasky org.omg.CORBA.StructMember[] _members = null; 67321936Shselasky if (_tc == null) { 68321936Shselasky _members= new org.omg.CORBA.StructMember[2]; 69321936Shselasky _members[0] = new org.omg.CORBA.StructMember( 70321936Shselasky "service_detail_type", 71321936Shselasky org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_ulong), 72321936Shselasky null); 73321936Shselasky 74321936Shselasky _members[1] = new org.omg.CORBA.StructMember( 75321936Shselasky "service_detail", 76321936Shselasky org.omg.CORBA.ORB.init().create_sequence_tc(0, org.omg.CORBA.ORB.init().get_primitive_tc(org.omg.CORBA.TCKind.tk_octet)), 77321936Shselasky null); 78321936Shselasky _tc = org.omg.CORBA.ORB.init().create_struct_tc(id(), "ServiceDetail", _members); 79321936Shselasky } 80321936Shselasky return _tc; 81321936Shselasky } 82321936Shselasky public static String id() { 83321936Shselasky return "IDL:omg.org/CORBA/ServiceDetail:1.0"; 84321936Shselasky } 85321936Shselasky} 86321936Shselasky