blob: 49ea79e9c1070c8490248e328f3bf877308b0061 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 1998 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
20 * CA 95054 USA or visit www.sun.com if you need additional information or
21 * have any questions.
22 */
23
24// Stub class generated by rmic, do not edit.
25// Contents subject to change without notice.
26
27public final class TestImpl_Stub
28 extends java.rmi.server.RemoteStub
29 implements Test, java.rmi.Remote
30{
31 private static final java.rmi.server.Operation[] operations = {
32 new java.rmi.server.Operation("java.lang.String echo(java.lang.String)")
33 };
34
35 private static final long interfaceHash = 8975711176019764637L;
36
37 private static final long serialVersionUID = 2;
38
39 private static boolean useNewInvoke;
40 private static java.lang.reflect.Method $method_echo_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_echo_0 = Test.class.getMethod("echo", new java.lang.Class[] {java.lang.String.class});
53 } catch (java.lang.NoSuchMethodException e) {
54 useNewInvoke = false;
55 }
56 }
57
58 // constructors
59 public TestImpl_Stub() {
60 super();
61 }
62 public TestImpl_Stub(java.rmi.server.RemoteRef ref) {
63 super(ref);
64 }
65
66 // methods from remote interfaces
67
68 // implementation of echo(String)
69 public java.lang.String echo(java.lang.String $param_String_1)
70 throws java.rmi.RemoteException
71 {
72 try {
73 if (useNewInvoke) {
74 Object $result = ref.invoke(this, $method_echo_0, new java.lang.Object[] {$param_String_1}, 5525131960618330777L);
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 try {
79 java.io.ObjectOutput out = call.getOutputStream();
80 out.writeObject($param_String_1);
81 } catch (java.io.IOException e) {
82 throw new java.rmi.MarshalException("error marshalling arguments", e);
83 }
84 ref.invoke(call);
85 java.lang.String $result;
86 try {
87 java.io.ObjectInput in = call.getInputStream();
88 $result = (java.lang.String) in.readObject();
89 } catch (java.io.IOException e) {
90 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
91 } catch (java.lang.ClassNotFoundException e) {
92 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
93 } finally {
94 ref.done(call);
95 }
96 return $result;
97 }
98 } catch (java.lang.RuntimeException e) {
99 throw e;
100 } catch (java.rmi.RemoteException e) {
101 throw e;
102 } catch (java.lang.Exception e) {
103 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
104 }
105 }
106}