001: /*
002: * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved.
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004: *
005: * This code is free software; you can redistribute it and/or modify it
006: * under the terms of the GNU General Public License version 2 only, as
007: * published by the Free Software Foundation. Sun designates this
008: * particular file as subject to the "Classpath" exception as provided
009: * by Sun in the LICENSE file that accompanied this code.
010: *
011: * This code is distributed in the hope that it will be useful, but WITHOUT
012: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
014: * version 2 for more details (a copy is included in the LICENSE file that
015: * accompanied this code).
016: *
017: * You should have received a copy of the GNU General Public License version
018: * 2 along with this work; if not, write to the Free Software Foundation,
019: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020: *
021: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
022: * CA 95054 USA or visit www.sun.com if you need additional information or
023: * have any questions.
024: */
025: package org.omg.CORBA;
026:
027: /**
028: * The Helper for <tt>UnknownUserException</tt>. For more information on
029: * Helper files, see <a href="doc-files/generatedfiles.html#helper">
030: * "Generated Files: Helper Files"</a>.<P>
031: * org/omg/CORBA/UnknownUserExceptionHelper.java
032: * Generated by the IDL-to-Java compiler (portable), version "3.0"
033: * from CORBA.idl
034: * Thursday, August 24, 2000 5:52:22 PM PDT
035: */
036:
037: abstract public class UnknownUserExceptionHelper {
038: private static String _id = "IDL:omg.org/CORBA/UnknownUserException:1.0";
039:
040: public static void insert(org.omg.CORBA.Any a,
041: org.omg.CORBA.UnknownUserException that) {
042: org.omg.CORBA.portable.OutputStream out = a
043: .create_output_stream();
044: a.type(type());
045: write(out, that);
046: a.read_value(out.create_input_stream(), type());
047: }
048:
049: public static org.omg.CORBA.UnknownUserException extract(
050: org.omg.CORBA.Any a) {
051: return read(a.create_input_stream());
052: }
053:
054: private static org.omg.CORBA.TypeCode __typeCode = null;
055: private static boolean __active = false;
056:
057: synchronized public static org.omg.CORBA.TypeCode type() {
058: if (__typeCode == null) {
059: synchronized (org.omg.CORBA.TypeCode.class) {
060: if (__typeCode == null) {
061: if (__active) {
062: return org.omg.CORBA.ORB.init()
063: .create_recursive_tc(_id);
064: }
065: __active = true;
066: org.omg.CORBA.StructMember[] _members0 = new org.omg.CORBA.StructMember[1];
067: org.omg.CORBA.TypeCode _tcOf_members0 = null;
068: _tcOf_members0 = org.omg.CORBA.ORB.init()
069: .get_primitive_tc(
070: org.omg.CORBA.TCKind.tk_any);
071: _members0[0] = new org.omg.CORBA.StructMember(
072: "except", _tcOf_members0, null);
073: __typeCode = org.omg.CORBA.ORB
074: .init()
075: .create_exception_tc(
076: org.omg.CORBA.UnknownUserExceptionHelper
077: .id(),
078: "UnknownUserException", _members0);
079: __active = false;
080: }
081: }
082: }
083: return __typeCode;
084: }
085:
086: public static String id() {
087: return _id;
088: }
089:
090: public static org.omg.CORBA.UnknownUserException read(
091: org.omg.CORBA.portable.InputStream istream) {
092: org.omg.CORBA.UnknownUserException value = new org.omg.CORBA.UnknownUserException();
093: // read and discard the repository ID
094: istream.read_string();
095: value.except = istream.read_any();
096: return value;
097: }
098:
099: public static void write(
100: org.omg.CORBA.portable.OutputStream ostream,
101: org.omg.CORBA.UnknownUserException value) {
102: // write the repository ID
103: ostream.write_string(id());
104: ostream.write_any(value.except);
105: }
106:
107: }
|