1/*
2 * Copyright (c) 1998, 2008, 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
27public final class HelloImpl_Stub
28    extends java.rmi.server.RemoteStub
29    implements Hello, java.rmi.Remote
30{
31    private static java.rmi.server.Operation[] operations = {
32        new java.rmi.server.Operation("java.lang.String sayHello()")
33    };
34
35    private static final long interfaceHash = 6486744599627128933L;
36
37    private static final long serialVersionUID = 2;
38
39    private static boolean useNewInvoke;
40    private static java.lang.reflect.Method $method_sayHello_0;
41
42    static {
43        try {
44            java.rmi.server.RemoteRef.class.getMethod("invoke",
45                new java.lang.Class[] {
46                    java.rmi.Remote.class,
47                    java.lang.reflect.Method.class,
48                    java.lang.Object[].class,
49                    long.class
50                });
51            useNewInvoke = true;
52            $method_sayHello_0 = Hello.class.getMethod("sayHello", new java.lang.Class[] {});
53        } catch (java.lang.NoSuchMethodException e) {
54            useNewInvoke = false;
55        }
56    }
57
58    // constructors
59    public HelloImpl_Stub() {
60        super();
61    }
62    public HelloImpl_Stub(java.rmi.server.RemoteRef ref) {
63        super(ref);
64    }
65
66    // methods from remote interfaces
67
68    // implementation of sayHello()
69    public java.lang.String sayHello()
70        throws java.rmi.RemoteException
71    {
72        try {
73            if (useNewInvoke) {
74                Object $result = ref.invoke(this, $method_sayHello_0, null, 6043973830760146143L);
75                return ((java.lang.String) $result);
76            } else {
77                java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
78                ref.invoke(call);
79                java.lang.String $result;
80                try {
81                    java.io.ObjectInput in = call.getInputStream();
82                    $result = (java.lang.String) in.readObject();
83                } catch (java.io.IOException e) {
84                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
85                } catch (java.lang.ClassNotFoundException e) {
86                    throw new java.rmi.UnmarshalException("error unmarshalling return", e);
87                } finally {
88                    ref.done(call);
89                }
90                return $result;
91            }
92        } catch (java.lang.RuntimeException e) {
93            throw e;
94        } catch (java.rmi.RemoteException e) {
95            throw e;
96        } catch (java.lang.Exception e) {
97            throw new java.rmi.UnexpectedException("undeclared checked exception", e);
98        }
99    }
100}
101