2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / gnu / java / rmi / registry / RegistryImpl_Stub.java
blob45e10c490506ca6eb4fa0c967fdb431a45c8fde7
1 /* RegistryImpl_Stub.java
2 Copyright (C) 2002 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
39 // Stub class generated by rmic - DO NOT EDIT!
41 package gnu.java.rmi.registry;
43 public final class RegistryImpl_Stub
44 extends java.rmi.server.RemoteStub
45 implements java.rmi.registry.Registry
47 private static final long serialVersionUID = 2L;
49 private static final long interfaceHash = 4905912898345647071L;
51 private static boolean useNewInvoke;
53 private static final java.rmi.server.Operation[] operations = {
54 new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
55 new java.rmi.server.Operation("java.lang.String[] list()"),
56 new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
57 new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
58 new java.rmi.server.Operation("void unbind(java.lang.String)")
61 private static java.lang.reflect.Method $method_bind_0;
62 private static java.lang.reflect.Method $method_list_1;
63 private static java.lang.reflect.Method $method_lookup_2;
64 private static java.lang.reflect.Method $method_rebind_3;
65 private static java.lang.reflect.Method $method_unbind_4;
67 static {
68 try {
69 java.rmi.server.RemoteRef.class.getMethod("invoke", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class });
70 useNewInvoke = false;
71 $method_bind_0 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("bind", new java.lang.Class[] {java.lang.String.class, java.rmi.Remote.class});
72 $method_list_1 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("list", new java.lang.Class[] {});
73 $method_lookup_2 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("lookup", new java.lang.Class[] {java.lang.String.class});
74 $method_rebind_3 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("rebind", new java.lang.Class[] {java.lang.String.class, java.rmi.Remote.class});
75 $method_unbind_4 = gnu.java.rmi.registry.RegistryImpl.class.getMethod("unbind", new java.lang.Class[] {java.lang.String.class});
78 catch (java.lang.NoSuchMethodException e) {
79 useNewInvoke = false;
83 public RegistryImpl_Stub() {
84 super();
86 public RegistryImpl_Stub(java.rmi.server.RemoteRef ref) {
87 super(ref);
90 public void bind(java.lang.String $param_0, java.rmi.Remote $param_1) throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException {
91 try {
92 if (useNewInvoke) {
93 ref.invoke(this, $method_bind_0, new java.lang.Object[] {$param_0, $param_1}, 7583982177005850366L);
95 else {
96 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 0, interfaceHash);
97 try {
98 java.io.ObjectOutput out = call.getOutputStream();
99 out.writeObject($param_0);
100 out.writeObject($param_1);
102 catch (java.io.IOException e) {
103 throw new java.rmi.MarshalException("error marshalling arguments", e);
105 ref.invoke(call);
106 try {
107 java.io.ObjectInput in = call.getInputStream();
109 catch (java.io.IOException e) {
110 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
112 finally {
113 ref.done(call);
117 catch (java.rmi.AccessException e) {
118 throw e;
120 catch (java.rmi.AlreadyBoundException e) {
121 throw e;
123 catch (java.rmi.RemoteException e) {
124 throw e;
126 catch (java.lang.Exception e) {
127 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
131 public java.lang.String[] list() throws java.rmi.AccessException, java.rmi.RemoteException {
132 try {
133 if (useNewInvoke) {
134 java.lang.Object $result = ref.invoke(this, $method_list_1, null, 2571371476350237748L);
135 return ((java.lang.String[])$result);
137 else {
138 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 1, interfaceHash);
139 try {
140 java.io.ObjectOutput out = call.getOutputStream();
142 catch (java.io.IOException e) {
143 throw new java.rmi.MarshalException("error marshalling arguments", e);
145 ref.invoke(call);
146 java.lang.String[] $result;
147 try {
148 java.io.ObjectInput in = call.getInputStream();
149 $result = (java.lang.String[])in.readObject();
150 return ($result);
152 catch (java.io.IOException e) {
153 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
155 finally {
156 ref.done(call);
160 catch (java.rmi.AccessException e) {
161 throw e;
163 catch (java.rmi.RemoteException e) {
164 throw e;
166 catch (java.lang.Exception e) {
167 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
171 public java.rmi.Remote lookup(java.lang.String $param_0) throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
172 try {
173 if (useNewInvoke) {
174 java.lang.Object $result = ref.invoke(this, $method_lookup_2, new java.lang.Object[] {$param_0}, -7538657168040752697L);
175 return ((java.rmi.Remote)$result);
177 else {
178 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 2, interfaceHash);
179 try {
180 java.io.ObjectOutput out = call.getOutputStream();
181 out.writeObject($param_0);
183 catch (java.io.IOException e) {
184 throw new java.rmi.MarshalException("error marshalling arguments", e);
186 ref.invoke(call);
187 java.rmi.Remote $result;
188 try {
189 java.io.ObjectInput in = call.getInputStream();
190 $result = (java.rmi.Remote)in.readObject();
191 return ($result);
193 catch (java.io.IOException e) {
194 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
196 finally {
197 ref.done(call);
201 catch (java.rmi.AccessException e) {
202 throw e;
204 catch (java.rmi.NotBoundException e) {
205 throw e;
207 catch (java.rmi.RemoteException e) {
208 throw e;
210 catch (java.lang.Exception e) {
211 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
215 public void rebind(java.lang.String $param_0, java.rmi.Remote $param_1) throws java.rmi.AccessException, java.rmi.RemoteException {
216 try {
217 if (useNewInvoke) {
218 ref.invoke(this, $method_rebind_3, new java.lang.Object[] {$param_0, $param_1}, -8381844669958460146L);
220 else {
221 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 3, interfaceHash);
222 try {
223 java.io.ObjectOutput out = call.getOutputStream();
224 out.writeObject($param_0);
225 out.writeObject($param_1);
227 catch (java.io.IOException e) {
228 throw new java.rmi.MarshalException("error marshalling arguments", e);
230 ref.invoke(call);
231 try {
232 java.io.ObjectInput in = call.getInputStream();
234 catch (java.io.IOException e) {
235 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
237 finally {
238 ref.done(call);
242 catch (java.rmi.AccessException e) {
243 throw e;
245 catch (java.rmi.RemoteException e) {
246 throw e;
248 catch (java.lang.Exception e) {
249 throw new java.rmi.UnexpectedException("undeclared checked exception", e);
253 public void unbind(java.lang.String $param_0) throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
254 try {
255 if (useNewInvoke) {
256 ref.invoke(this, $method_unbind_4, new java.lang.Object[] {$param_0}, 7305022919901907578L);
258 else {
259 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject)this, operations, 4, interfaceHash);
260 try {
261 java.io.ObjectOutput out = call.getOutputStream();
262 out.writeObject($param_0);
264 catch (java.io.IOException e) {
265 throw new java.rmi.MarshalException("error marshalling arguments", e);
267 ref.invoke(call);
268 try {
269 java.io.ObjectInput in = call.getInputStream();
271 catch (java.io.IOException e) {
272 throw new java.rmi.UnmarshalException("error unmarshalling return", e);
274 finally {
275 ref.done(call);
279 catch (java.rmi.AccessException e) {
280 throw e;
282 catch (java.rmi.NotBoundException e) {
283 throw e;
285 catch (java.rmi.RemoteException e) {
286 throw e;
288 catch (java.lang.Exception e) {
289 throw new java.rmi.UnexpectedException("undeclared checked exception", e);