1/*
2 * Copyright (c) 2016, 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.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24// Stub class generated by rmic, do not edit.
25// Contents subject to change without notice.
26
27import java.io.Serializable;
28import java.rmi.Remote;
29import java.rmi.RemoteException;
30import java.rmi.UnexpectedException;
31import javax.rmi.CORBA.Stub;
32import javax.rmi.CORBA.Util;
33import org.omg.CORBA.ORB;
34import org.omg.CORBA.SystemException;
35import org.omg.CORBA.portable.ApplicationException;
36import org.omg.CORBA.portable.InputStream;
37import org.omg.CORBA.portable.OutputStream;
38import org.omg.CORBA.portable.RemarshalException;
39import org.omg.CORBA.portable.ResponseHandler;
40import org.omg.CORBA.portable.ServantObject;
41
42
43public class _HelloInterface_Stub extends Stub implements HelloInterface {
44
45    private static final String[] _type_ids = {
46        "RMI:HelloInterface:0000000000000000"
47    };
48
49        public String[] _ids() {
50            return (String[]) _type_ids.clone();
51        }
52
53        public Test3 sayHelloWithTest3(Test3 arg0) throws java.rmi.RemoteException {
54            if (!Util.isLocal(this)) {
55                try {
56                    org.omg.CORBA_2_3.portable.InputStream in = null;
57                    try {
58                        org.omg.CORBA_2_3.portable.OutputStream out =
59                            (org.omg.CORBA_2_3.portable.OutputStream)
60                            _request("sayHelloWithTest3", true);
61                        out.write_value(arg0,Test3.class);
62                        in = (org.omg.CORBA_2_3.portable.InputStream)_invoke(out);
63                        return (Test3) in.read_value(Test3.class);
64                    } catch (ApplicationException ex) {
65                        in = (org.omg.CORBA_2_3.portable.InputStream) ex.getInputStream();
66                        String $_id = in.read_string();
67                        throw new UnexpectedException($_id);
68                    } catch (RemarshalException ex) {
69                        return sayHelloWithTest3(arg0);
70                    } finally {
71                        _releaseReply(in);
72                    }
73                } catch (SystemException ex) {
74                    throw Util.mapSystemException(ex);
75                }
76            } else {
77                ServantObject so = _servant_preinvoke("sayHelloWithTest3",HelloInterface.class);
78                if (so == null) {
79                    return sayHelloWithTest3(arg0);
80                }
81                try {
82                    Test3 arg0Copy = (Test3) Util.copyObject(arg0,_orb());
83                    Test3 result = ((HelloInterface)so.servant).sayHelloWithTest3(arg0Copy);
84                    return (Test3)Util.copyObject(result,_orb());
85                } catch (Throwable ex) {
86                    Throwable exCopy = (Throwable)Util.copyObject(ex,_orb());
87                    throw Util.wrapException(exCopy);
88                } finally {
89                    _servant_postinvoke(so);
90                }
91            }
92        }
93    }
94