001: /*
002: * RMI stub class
003: * for class org.apache.harmony.rmi.registry.RegistryImpl
004: * Compatible with stub protocol version 1.1/1.2
005: *
006: * Generated by DRL RMI Compiler (rmic).
007: *
008: * DO NOT EDIT!!!
009: * Contents subject to change without notice!
010: */
011: package org.apache.harmony.rmi.registry;
012:
013: import org.apache.harmony.rmi.internal.nls.Messages;
014:
015: public final class RegistryImpl_Stub extends java.rmi.server.RemoteStub
016: implements java.rmi.registry.Registry, java.rmi.Remote {
017:
018: private static final long serialVersionUID = 2;
019:
020: private static final long interfaceHash = 4905912898345647071L;
021:
022: private static boolean useNewInvoke;
023:
024: private static final java.rmi.server.Operation[] operations = {
025: new java.rmi.server.Operation(
026: "void bind(java.lang.String, java.rmi.Remote)"), //$NON-NLS-1$
027: new java.rmi.server.Operation("java.lang.String list()[]"), //$NON-NLS-1$
028: new java.rmi.server.Operation(
029: "java.rmi.Remote lookup(java.lang.String)"), //$NON-NLS-1$
030: new java.rmi.server.Operation(
031: "void rebind(java.lang.String, java.rmi.Remote)"), //$NON-NLS-1$
032: new java.rmi.server.Operation(
033: "void unbind(java.lang.String)") //$NON-NLS-1$
034: };
035:
036: private static java.lang.reflect.Method $method_bind_0;
037: private static java.lang.reflect.Method $method_list_1;
038: private static java.lang.reflect.Method $method_lookup_2;
039: private static java.lang.reflect.Method $method_rebind_3;
040: private static java.lang.reflect.Method $method_unbind_4;
041:
042: static {
043: try {
044: java.rmi.server.RemoteRef.class
045: .getMethod(
046: "invoke", new java.lang.Class[] { java.rmi.Remote.class, java.lang.reflect.Method.class, java.lang.Object[].class, long.class }); //$NON-NLS-1$
047:
048: $method_bind_0 = java.rmi.registry.Registry.class
049: .getMethod(
050: "bind", new java.lang.Class[] { java.lang.String.class, java.rmi.Remote.class }); //$NON-NLS-1$
051: $method_list_1 = java.rmi.registry.Registry.class
052: .getMethod("list", new java.lang.Class[] {}); //$NON-NLS-1$
053: $method_lookup_2 = java.rmi.registry.Registry.class
054: .getMethod(
055: "lookup", new java.lang.Class[] { java.lang.String.class }); //$NON-NLS-1$
056: $method_rebind_3 = java.rmi.registry.Registry.class
057: .getMethod(
058: "rebind", new java.lang.Class[] { java.lang.String.class, java.rmi.Remote.class }); //$NON-NLS-1$
059: $method_unbind_4 = java.rmi.registry.Registry.class
060: .getMethod(
061: "unbind", new java.lang.Class[] { java.lang.String.class }); //$NON-NLS-1$
062:
063: useNewInvoke = true;
064: } catch (java.lang.NoSuchMethodException e) {
065: useNewInvoke = false;
066: }
067: }
068:
069: public RegistryImpl_Stub() {
070: super ();
071: }
072:
073: public RegistryImpl_Stub(java.rmi.server.RemoteRef ref) {
074: super (ref);
075: }
076:
077: // Implementation of bind(String, Remote)
078: public void bind(java.lang.String $param_String_1,
079: java.rmi.Remote $param_Remote_2)
080: throws java.rmi.RemoteException,
081: java.rmi.AlreadyBoundException, java.rmi.AccessException {
082: try {
083: if (useNewInvoke) {
084: ref
085: .invoke(this , $method_bind_0,
086: new java.lang.Object[] {
087: $param_String_1,
088: $param_Remote_2 },
089: 7583982177005850366L);
090: } else {
091: java.rmi.server.RemoteCall call = ref.newCall(
092: (java.rmi.server.RemoteObject) this ,
093: operations, 0, interfaceHash);
094:
095: try {
096: java.io.ObjectOutput out = call.getOutputStream();
097: out.writeObject($param_String_1);
098: out.writeObject($param_Remote_2);
099: } catch (java.io.IOException e) {
100: throw new java.rmi.MarshalException(Messages
101: .getString("rmi.26"), e); //$NON-NLS-1$
102: }
103:
104: ref.invoke(call);
105:
106: ref.done(call);
107: }
108: } catch (java.lang.RuntimeException e) {
109: throw e;
110: } catch (java.rmi.RemoteException e) {
111: throw e;
112: } catch (java.rmi.AlreadyBoundException e) {
113: throw e;
114: } catch (java.lang.Exception e) {
115: throw new java.rmi.UnexpectedException(Messages
116: .getString("rmi.0C"), e); //$NON-NLS-1$
117: }
118: }
119:
120: // Implementation of list()
121: public java.lang.String[] list() throws java.rmi.RemoteException,
122: java.rmi.AccessException {
123: try {
124: if (useNewInvoke) {
125: java.lang.Object $result = ref.invoke(this ,
126: $method_list_1, null, 2571371476350237748L);
127: return ((java.lang.String[]) $result);
128: } else {
129: java.rmi.server.RemoteCall call = ref.newCall(
130: (java.rmi.server.RemoteObject) this ,
131: operations, 1, interfaceHash);
132:
133: ref.invoke(call);
134:
135: java.lang.String[] $result;
136:
137: try {
138: java.io.ObjectInput in = call.getInputStream();
139: $result = (java.lang.String[]) in.readObject();
140: } catch (java.io.IOException e) {
141: throw new java.rmi.UnmarshalException(Messages
142: .getString("rmi.27"), e); //$NON-NLS-1$
143: } catch (java.lang.ClassNotFoundException e) {
144: throw new java.rmi.UnmarshalException(Messages
145: .getString("rmi.27"), e); //$NON-NLS-1$
146: } finally {
147: ref.done(call);
148: }
149:
150: return $result;
151: }
152: } catch (java.lang.RuntimeException e) {
153: throw e;
154: } catch (java.rmi.RemoteException e) {
155: throw e;
156: } catch (java.lang.Exception e) {
157: throw new java.rmi.UnexpectedException(Messages
158: .getString("rmi.0C"), e); //$NON-NLS-1$
159: }
160: }
161:
162: // Implementation of lookup(String)
163: public java.rmi.Remote lookup(java.lang.String $param_String_1)
164: throws java.rmi.RemoteException,
165: java.rmi.NotBoundException, java.rmi.AccessException {
166: try {
167: if (useNewInvoke) {
168: java.lang.Object $result = ref.invoke(this ,
169: $method_lookup_2,
170: new java.lang.Object[] { $param_String_1 },
171: -7538657168040752697L);
172: return ((java.rmi.Remote) $result);
173: } else {
174: java.rmi.server.RemoteCall call = ref.newCall(
175: (java.rmi.server.RemoteObject) this ,
176: operations, 2, interfaceHash);
177:
178: try {
179: java.io.ObjectOutput out = call.getOutputStream();
180: out.writeObject($param_String_1);
181: } catch (java.io.IOException e) {
182: throw new java.rmi.MarshalException(Messages
183: .getString("rmi.26"), e); //$NON-NLS-1$
184: }
185:
186: ref.invoke(call);
187:
188: java.rmi.Remote $result;
189:
190: try {
191: java.io.ObjectInput in = call.getInputStream();
192: $result = (java.rmi.Remote) in.readObject();
193: } catch (java.io.IOException e) {
194: throw new java.rmi.UnmarshalException(Messages
195: .getString("rmi.27"), e); //$NON-NLS-1$
196: } catch (java.lang.ClassNotFoundException e) {
197: throw new java.rmi.UnmarshalException(Messages
198: .getString("rmi.27"), e); //$NON-NLS-1$
199: } finally {
200: ref.done(call);
201: }
202:
203: return $result;
204: }
205: } catch (java.lang.RuntimeException e) {
206: throw e;
207: } catch (java.rmi.RemoteException e) {
208: throw e;
209: } catch (java.rmi.NotBoundException e) {
210: throw e;
211: } catch (java.lang.Exception e) {
212: throw new java.rmi.UnexpectedException(Messages
213: .getString("rmi.0C"), e); //$NON-NLS-1$
214: }
215: }
216:
217: // Implementation of rebind(String, Remote)
218: public void rebind(java.lang.String $param_String_1,
219: java.rmi.Remote $param_Remote_2)
220: throws java.rmi.RemoteException, java.rmi.AccessException {
221: try {
222: if (useNewInvoke) {
223: ref.invoke(this , $method_rebind_3,
224: new java.lang.Object[] { $param_String_1,
225: $param_Remote_2 },
226: -8381844669958460146L);
227: } else {
228: java.rmi.server.RemoteCall call = ref.newCall(
229: (java.rmi.server.RemoteObject) this ,
230: operations, 3, interfaceHash);
231:
232: try {
233: java.io.ObjectOutput out = call.getOutputStream();
234: out.writeObject($param_String_1);
235: out.writeObject($param_Remote_2);
236: } catch (java.io.IOException e) {
237: throw new java.rmi.MarshalException(Messages
238: .getString("rmi.26"), e); //$NON-NLS-1$
239: }
240:
241: ref.invoke(call);
242:
243: ref.done(call);
244: }
245: } catch (java.lang.RuntimeException e) {
246: throw e;
247: } catch (java.rmi.RemoteException e) {
248: throw e;
249: } catch (java.lang.Exception e) {
250: throw new java.rmi.UnexpectedException(Messages
251: .getString("rmi.0C"), e); //$NON-NLS-1$
252: }
253: }
254:
255: // Implementation of unbind(String)
256: public void unbind(java.lang.String $param_String_1)
257: throws java.rmi.RemoteException,
258: java.rmi.NotBoundException, java.rmi.AccessException {
259: try {
260: if (useNewInvoke) {
261: ref.invoke(this , $method_unbind_4,
262: new java.lang.Object[] { $param_String_1 },
263: 7305022919901907578L);
264: } else {
265: java.rmi.server.RemoteCall call = ref.newCall(
266: (java.rmi.server.RemoteObject) this ,
267: operations, 4, interfaceHash);
268:
269: try {
270: java.io.ObjectOutput out = call.getOutputStream();
271: out.writeObject($param_String_1);
272: } catch (java.io.IOException e) {
273: throw new java.rmi.MarshalException(Messages
274: .getString("rmi.26"), e); //$NON-NLS-1$
275: }
276:
277: ref.invoke(call);
278:
279: ref.done(call);
280: }
281: } catch (java.lang.RuntimeException e) {
282: throw e;
283: } catch (java.rmi.RemoteException e) {
284: throw e;
285: } catch (java.rmi.NotBoundException e) {
286: throw e;
287: } catch (java.lang.Exception e) {
288: throw new java.rmi.UnexpectedException(Messages
289: .getString("rmi.0C"), e); //$NON-NLS-1$
290: }
291: }
292: }
|