blob: d12b389d476685c7287ffbea0456d98720729f45 [file] [log] [blame]
J. Duke319a3b92007-12-01 00:00:00 +00001/*
2 * Copyright 1999 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 HttpSocketTest_Stub
28 extends java.rmi.server.RemoteStub
29 implements MyRemoteInterface, java.rmi.Remote
30{
31 private static final java.rmi.server.Operation[] operations = {
32 new java.rmi.server.Operation("java.rmi.Remote getRemoteObject()"),
33 new java.rmi.server.Operation("void setRemoteObject(java.rmi.Remote)")
34 };
35
36 private static final long interfaceHash = 3775375480010579665L;
37
38 private static final long serialVersionUID = 2;
39
40 private static boolean useNewInvoke;
41 private static java.lang.reflect.Method $method_getRemoteObject_0;
42 private static java.lang.reflect.Method $method_setRemoteObject_1;
43
44 static {
45 try {
46 java.rmi.server.RemoteRef.class.getMethod("invoke",
47 new java.lang.Class[] {
48 java.rmi.Remote.class,
49 java.lang.reflect.Method.class,
50 java.lang.Object[].class,
51 long.class
52 });
53 useNewInvoke = true;
54 $method_getRemoteObject_0 = MyRemoteInterface.class.getMethod("getRemoteObject", new java.lang.Class[] {});
55 $method_setRemoteObject_1 = MyRemoteInterface.class.getMethod("setRemoteObject", new java.lang.Class[] {java.rmi.Remote.class});
56 } catch (java.lang.NoSuchMethodException e) {
57 useNewInvoke = false;
58 }
59 }
60
61 // constructors
62 public HttpSocketTest_Stub() {
63 super();
64 }
65 public HttpSocketTest_Stub(java.rmi.server.RemoteRef ref) {
66 super(ref);
67 }
68
69 // methods from remote interfaces
70
71 // implementation of getRemoteObject()
72 public java.rmi.Remote getRemoteObject()
73 throws java.rmi.RemoteException
74 {
75 try {
76 if (useNewInvoke) {
77 Object $result = ref.invoke(this, $method_getRemoteObject_0, null, -2578437860804964265L);
78 return ((java.rmi.Remote) $result);
79 } else {
80 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
81 ref.invoke(call);
82 java.rmi.Remote $result;
83 try {
84 java.io.ObjectInput in = call.getInputStream();
85 $result = (java.rmi.Remote) in.readObject();
86 } catch (java.io.IOException e) {
87 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
88 } catch (java.lang.ClassNotFoundException e) {
89 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
90 } finally {
91 ref.done(call);
92 }
93 return $result;
94 }
95 } catch (java.lang.RuntimeException e) {
96 throw e;
97 } catch (java.rmi.RemoteException e) {
98 throw e;
99 } catch (java.lang.Exception e) {
100 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
101 }
102 }
103
104 // implementation of setRemoteObject(Remote)
105 public void setRemoteObject(java.rmi.Remote $param_Remote_1)
106 throws java.rmi.RemoteException
107 {
108 try {
109 if (useNewInvoke) {
110 ref.invoke(this, $method_setRemoteObject_1, new java.lang.Object[] {$param_Remote_1}, -7518632118115022871L);
111 } else {
112 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
113 try {
114 java.io.ObjectOutput out = call.getOutputStream();
115 out.writeObject($param_Remote_1);
116 } catch (java.io.IOException e) {
117 throw new java.rmi.MarshalException("error marshalling arguments", e);
118 }
119 ref.invoke(call);
120 ref.done(call);
121 }
122 } catch (java.lang.RuntimeException e) {
123 throw e;
124 } catch (java.rmi.RemoteException e) {
125 throw e;
126 } catch (java.lang.Exception e) {
127 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
128 }
129 }
130}