OperationModeHelper.java revision 608:7e06bf1dcb09
1184610Salfred/*
2184610Salfred * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
3184610Salfred * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4184610Salfred *
5184610Salfred * This code is free software; you can redistribute it and/or modify it
6184610Salfred * under the terms of the GNU General Public License version 2 only, as
7184610Salfred * published by the Free Software Foundation.  Oracle designates this
8184610Salfred * particular file as subject to the "Classpath" exception as provided
9184610Salfred * by Oracle in the LICENSE file that accompanied this code.
10184610Salfred *
11184610Salfred * This code is distributed in the hope that it will be useful, but WITHOUT
12184610Salfred * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13184610Salfred * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14184610Salfred * version 2 for more details (a copy is included in the LICENSE file that
15184610Salfred * accompanied this code).
16184610Salfred *
17184610Salfred * You should have received a copy of the GNU General Public License version
18184610Salfred * 2 along with this work; if not, write to the Free Software Foundation,
19184610Salfred * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20184610Salfred *
21184610Salfred * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22184610Salfred * or visit www.oracle.com if you need additional information or have any
23184610Salfred * questions.
24184610Salfred */
25184610Salfredpackage com.sun.org.omg.CORBA;
26184610Salfred
27184610Salfred
28184610Salfred/**
29184610Salfred* com/sun/org/omg/CORBA/OperationModeHelper.java
30184610Salfred* Generated by the IDL-to-Java compiler (portable), version "3.0"
31184610Salfred* from ir.idl
32184610Salfred* Thursday, May 6, 1999 1:51:50 AM PDT
33184610Salfred*/
34184610Salfred
35184610Salfredpublic final class OperationModeHelper
36184610Salfred{
37184610Salfred    private static String  _id = "IDL:omg.org/CORBA/OperationMode:1.0";
38184610Salfred
39184610Salfred    public OperationModeHelper()
40184610Salfred    {
41184610Salfred    }
42184610Salfred
43184610Salfred    public static void insert (org.omg.CORBA.Any a, com.sun.org.omg.CORBA.OperationMode that)
44184610Salfred    {
45184610Salfred        org.omg.CORBA.portable.OutputStream out = a.create_output_stream ();
46184610Salfred        a.type (type ());
47184610Salfred        write (out, that);
48184610Salfred        a.read_value (out.create_input_stream (), type ());
49184610Salfred    }
50184610Salfred
51184610Salfred    public static com.sun.org.omg.CORBA.OperationMode extract (org.omg.CORBA.Any a)
52184610Salfred    {
53184610Salfred        return read (a.create_input_stream ());
54184610Salfred    }
55184610Salfred
56184610Salfred    private static org.omg.CORBA.TypeCode __typeCode = null;
57184610Salfred    synchronized public static org.omg.CORBA.TypeCode type ()
58184610Salfred    {
59184610Salfred        if (__typeCode == null)
60184610Salfred            {
61184610Salfred                __typeCode = org.omg.CORBA.ORB.init ().create_enum_tc (com.sun.org.omg.CORBA.OperationModeHelper.id (), "OperationMode", new String[] { "OP_NORMAL", "OP_ONEWAY"} );
62184610Salfred            }
63184610Salfred        return __typeCode;
64184610Salfred    }
65184610Salfred
66184610Salfred    public static String id ()
67184610Salfred    {
68184610Salfred        return _id;
69184610Salfred    }
70184610Salfred
71184610Salfred    public static com.sun.org.omg.CORBA.OperationMode read (org.omg.CORBA.portable.InputStream istream)
72184610Salfred    {
73184610Salfred        return com.sun.org.omg.CORBA.OperationMode.from_int (istream.read_long ());
74184610Salfred    }
75184610Salfred
76184610Salfred    public static void write (org.omg.CORBA.portable.OutputStream ostream, com.sun.org.omg.CORBA.OperationMode value)
77184610Salfred    {
78184610Salfred        ostream.write_long (value.value ());
79184610Salfred    }
80184610Salfred
81184610Salfred}
82184610Salfred