equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
22 * or visit www.oracle.com if you need additional information or have any |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
26 package sun.rmi.registry; |
26 package sun.rmi.registry; |
|
27 |
|
28 import java.io.IOException; |
|
29 |
|
30 import sun.rmi.transport.StreamRemoteCall; |
|
31 |
27 /** |
32 /** |
28 * Stubs to invoke RegistryImpl remote methods. |
33 * Stubs to invoke RegistryImpl remote methods. |
29 * Originally generated from RMIC but frozen to match RegistryImpl_Skel. |
34 * Originally generated from RMIC but frozen to match RegistryImpl_Skel. |
30 */ |
35 */ |
31 @SuppressWarnings({"deprecation", "serial"}) |
36 @SuppressWarnings({"deprecation", "serial"}) |
55 |
60 |
56 // implementation of bind(String, Remote) |
61 // implementation of bind(String, Remote) |
57 public void bind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2) |
62 public void bind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2) |
58 throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException { |
63 throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException { |
59 try { |
64 try { |
60 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash); |
65 StreamRemoteCall call = (StreamRemoteCall)ref.newCall(this, operations, 0, interfaceHash); |
61 try { |
66 try { |
62 java.io.ObjectOutput out = call.getOutputStream(); |
67 java.io.ObjectOutput out = call.getOutputStream(); |
63 out.writeObject($param_String_1); |
68 out.writeObject($param_String_1); |
64 out.writeObject($param_Remote_2); |
69 out.writeObject($param_Remote_2); |
65 } catch (java.io.IOException e) { |
70 } catch (java.io.IOException e) { |
80 |
85 |
81 // implementation of list() |
86 // implementation of list() |
82 public java.lang.String[] list() |
87 public java.lang.String[] list() |
83 throws java.rmi.AccessException, java.rmi.RemoteException { |
88 throws java.rmi.AccessException, java.rmi.RemoteException { |
84 try { |
89 try { |
85 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash); |
90 StreamRemoteCall call = (StreamRemoteCall)ref.newCall(this, operations, 1, interfaceHash); |
86 ref.invoke(call); |
91 ref.invoke(call); |
87 java.lang.String[] $result; |
92 java.lang.String[] $result; |
88 try { |
93 try { |
89 java.io.ObjectInput in = call.getInputStream(); |
94 java.io.ObjectInput in = call.getInputStream(); |
90 $result = (java.lang.String[]) in.readObject(); |
95 $result = (java.lang.String[]) in.readObject(); |
91 } catch (java.io.IOException e) { |
96 } catch (ClassCastException | IOException | ClassNotFoundException e) { |
92 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
97 call.discardPendingRefs(); |
93 } catch (java.lang.ClassNotFoundException e) { |
|
94 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
98 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
95 } finally { |
99 } finally { |
96 ref.done(call); |
100 ref.done(call); |
97 } |
101 } |
98 return $result; |
102 return $result; |
107 |
111 |
108 // implementation of lookup(String) |
112 // implementation of lookup(String) |
109 public java.rmi.Remote lookup(java.lang.String $param_String_1) |
113 public java.rmi.Remote lookup(java.lang.String $param_String_1) |
110 throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException { |
114 throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException { |
111 try { |
115 try { |
112 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash); |
116 StreamRemoteCall call = (StreamRemoteCall)ref.newCall(this, operations, 2, interfaceHash); |
113 try { |
117 try { |
114 java.io.ObjectOutput out = call.getOutputStream(); |
118 java.io.ObjectOutput out = call.getOutputStream(); |
115 out.writeObject($param_String_1); |
119 out.writeObject($param_String_1); |
116 } catch (java.io.IOException e) { |
120 } catch (java.io.IOException e) { |
117 throw new java.rmi.MarshalException("error marshalling arguments", e); |
121 throw new java.rmi.MarshalException("error marshalling arguments", e); |
119 ref.invoke(call); |
123 ref.invoke(call); |
120 java.rmi.Remote $result; |
124 java.rmi.Remote $result; |
121 try { |
125 try { |
122 java.io.ObjectInput in = call.getInputStream(); |
126 java.io.ObjectInput in = call.getInputStream(); |
123 $result = (java.rmi.Remote) in.readObject(); |
127 $result = (java.rmi.Remote) in.readObject(); |
124 } catch (java.io.IOException e) { |
128 } catch (ClassCastException | IOException | ClassNotFoundException e) { |
125 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
129 call.discardPendingRefs(); |
126 } catch (java.lang.ClassNotFoundException e) { |
|
127 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
130 throw new java.rmi.UnmarshalException("error unmarshalling return", e); |
128 } finally { |
131 } finally { |
129 ref.done(call); |
132 ref.done(call); |
130 } |
133 } |
131 return $result; |
134 return $result; |
142 |
145 |
143 // implementation of rebind(String, Remote) |
146 // implementation of rebind(String, Remote) |
144 public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2) |
147 public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2) |
145 throws java.rmi.AccessException, java.rmi.RemoteException { |
148 throws java.rmi.AccessException, java.rmi.RemoteException { |
146 try { |
149 try { |
147 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash); |
150 StreamRemoteCall call = (StreamRemoteCall)ref.newCall(this, operations, 3, interfaceHash); |
148 try { |
151 try { |
149 java.io.ObjectOutput out = call.getOutputStream(); |
152 java.io.ObjectOutput out = call.getOutputStream(); |
150 out.writeObject($param_String_1); |
153 out.writeObject($param_String_1); |
151 out.writeObject($param_Remote_2); |
154 out.writeObject($param_Remote_2); |
152 } catch (java.io.IOException e) { |
155 } catch (java.io.IOException e) { |
165 |
168 |
166 // implementation of unbind(String) |
169 // implementation of unbind(String) |
167 public void unbind(java.lang.String $param_String_1) |
170 public void unbind(java.lang.String $param_String_1) |
168 throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException { |
171 throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException { |
169 try { |
172 try { |
170 java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash); |
173 StreamRemoteCall call = (StreamRemoteCall)ref.newCall(this, operations, 4, interfaceHash); |
171 try { |
174 try { |
172 java.io.ObjectOutput out = call.getOutputStream(); |
175 java.io.ObjectOutput out = call.getOutputStream(); |
173 out.writeObject($param_String_1); |
176 out.writeObject($param_String_1); |
174 } catch (java.io.IOException e) { |
177 } catch (java.io.IOException e) { |
175 throw new java.rmi.MarshalException("error marshalling arguments", e); |
178 throw new java.rmi.MarshalException("error marshalling arguments", e); |