45989
|
1 |
/*
|
|
2 |
* Copyright (c) 2017, Oracle and/or its affiliates. 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. Oracle designates this
|
|
8 |
* particular file as subject to the "Classpath" exception as provided
|
|
9 |
* by Oracle in the LICENSE file that accompanied this code.
|
|
10 |
*
|
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT
|
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that
|
|
15 |
* accompanied this code).
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License version
|
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation,
|
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
20 |
*
|
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
|
22 |
* or visit www.oracle.com if you need additional information or have any
|
|
23 |
* questions.
|
|
24 |
*/
|
|
25 |
|
|
26 |
package sun.rmi.registry;
|
|
27 |
/**
|
|
28 |
* Stubs to invoke RegistryImpl remote methods.
|
|
29 |
* Originally generated from RMIC but frozen to match RegistryImpl_Skel.
|
|
30 |
*/
|
|
31 |
@SuppressWarnings({"deprecation", "serial"})
|
|
32 |
public final class RegistryImpl_Stub
|
|
33 |
extends java.rmi.server.RemoteStub
|
|
34 |
implements java.rmi.registry.Registry, java.rmi.Remote {
|
|
35 |
private static final java.rmi.server.Operation[] operations = {
|
|
36 |
new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
|
|
37 |
new java.rmi.server.Operation("java.lang.String list()[]"),
|
|
38 |
new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
|
|
39 |
new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
|
|
40 |
new java.rmi.server.Operation("void unbind(java.lang.String)")
|
|
41 |
};
|
|
42 |
|
|
43 |
private static final long interfaceHash = 4905912898345647071L;
|
|
44 |
|
|
45 |
// constructors
|
|
46 |
public RegistryImpl_Stub() {
|
|
47 |
super();
|
|
48 |
}
|
|
49 |
|
|
50 |
public RegistryImpl_Stub(java.rmi.server.RemoteRef ref) {
|
|
51 |
super(ref);
|
|
52 |
}
|
|
53 |
|
|
54 |
// methods from remote interfaces
|
|
55 |
|
|
56 |
// implementation of bind(String, Remote)
|
|
57 |
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 {
|
|
59 |
try {
|
|
60 |
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
|
|
61 |
try {
|
|
62 |
java.io.ObjectOutput out = call.getOutputStream();
|
|
63 |
out.writeObject($param_String_1);
|
|
64 |
out.writeObject($param_Remote_2);
|
|
65 |
} catch (java.io.IOException e) {
|
|
66 |
throw new java.rmi.MarshalException("error marshalling arguments", e);
|
|
67 |
}
|
|
68 |
ref.invoke(call);
|
|
69 |
ref.done(call);
|
|
70 |
} catch (java.lang.RuntimeException e) {
|
|
71 |
throw e;
|
|
72 |
} catch (java.rmi.RemoteException e) {
|
|
73 |
throw e;
|
|
74 |
} catch (java.rmi.AlreadyBoundException e) {
|
|
75 |
throw e;
|
|
76 |
} catch (java.lang.Exception e) {
|
|
77 |
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
|
|
78 |
}
|
|
79 |
}
|
|
80 |
|
|
81 |
// implementation of list()
|
|
82 |
public java.lang.String[] list()
|
|
83 |
throws java.rmi.AccessException, java.rmi.RemoteException {
|
|
84 |
try {
|
|
85 |
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
|
|
86 |
ref.invoke(call);
|
|
87 |
java.lang.String[] $result;
|
|
88 |
try {
|
|
89 |
java.io.ObjectInput in = call.getInputStream();
|
|
90 |
$result = (java.lang.String[]) in.readObject();
|
|
91 |
} catch (java.io.IOException e) {
|
|
92 |
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
|
|
93 |
} catch (java.lang.ClassNotFoundException e) {
|
|
94 |
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
|
|
95 |
} finally {
|
|
96 |
ref.done(call);
|
|
97 |
}
|
|
98 |
return $result;
|
|
99 |
} catch (java.lang.RuntimeException e) {
|
|
100 |
throw e;
|
|
101 |
} catch (java.rmi.RemoteException e) {
|
|
102 |
throw e;
|
|
103 |
} catch (java.lang.Exception e) {
|
|
104 |
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
|
|
105 |
}
|
|
106 |
}
|
|
107 |
|
|
108 |
// implementation of lookup(String)
|
|
109 |
public java.rmi.Remote lookup(java.lang.String $param_String_1)
|
|
110 |
throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
|
|
111 |
try {
|
|
112 |
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
|
|
113 |
try {
|
|
114 |
java.io.ObjectOutput out = call.getOutputStream();
|
|
115 |
out.writeObject($param_String_1);
|
|
116 |
} catch (java.io.IOException e) {
|
|
117 |
throw new java.rmi.MarshalException("error marshalling arguments", e);
|
|
118 |
}
|
|
119 |
ref.invoke(call);
|
|
120 |
java.rmi.Remote $result;
|
|
121 |
try {
|
|
122 |
java.io.ObjectInput in = call.getInputStream();
|
|
123 |
$result = (java.rmi.Remote) in.readObject();
|
|
124 |
} catch (java.io.IOException e) {
|
|
125 |
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
|
|
126 |
} catch (java.lang.ClassNotFoundException e) {
|
|
127 |
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
|
|
128 |
} finally {
|
|
129 |
ref.done(call);
|
|
130 |
}
|
|
131 |
return $result;
|
|
132 |
} catch (java.lang.RuntimeException e) {
|
|
133 |
throw e;
|
|
134 |
} catch (java.rmi.RemoteException e) {
|
|
135 |
throw e;
|
|
136 |
} catch (java.rmi.NotBoundException e) {
|
|
137 |
throw e;
|
|
138 |
} catch (java.lang.Exception e) {
|
|
139 |
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
|
|
140 |
}
|
|
141 |
}
|
|
142 |
|
|
143 |
// implementation of rebind(String, Remote)
|
|
144 |
public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
|
|
145 |
throws java.rmi.AccessException, java.rmi.RemoteException {
|
|
146 |
try {
|
|
147 |
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
|
|
148 |
try {
|
|
149 |
java.io.ObjectOutput out = call.getOutputStream();
|
|
150 |
out.writeObject($param_String_1);
|
|
151 |
out.writeObject($param_Remote_2);
|
|
152 |
} catch (java.io.IOException e) {
|
|
153 |
throw new java.rmi.MarshalException("error marshalling arguments", e);
|
|
154 |
}
|
|
155 |
ref.invoke(call);
|
|
156 |
ref.done(call);
|
|
157 |
} catch (java.lang.RuntimeException e) {
|
|
158 |
throw e;
|
|
159 |
} catch (java.rmi.RemoteException e) {
|
|
160 |
throw e;
|
|
161 |
} catch (java.lang.Exception e) {
|
|
162 |
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
|
|
163 |
}
|
|
164 |
}
|
|
165 |
|
|
166 |
// implementation of unbind(String)
|
|
167 |
public void unbind(java.lang.String $param_String_1)
|
|
168 |
throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException {
|
|
169 |
try {
|
|
170 |
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
|
|
171 |
try {
|
|
172 |
java.io.ObjectOutput out = call.getOutputStream();
|
|
173 |
out.writeObject($param_String_1);
|
|
174 |
} catch (java.io.IOException e) {
|
|
175 |
throw new java.rmi.MarshalException("error marshalling arguments", e);
|
|
176 |
}
|
|
177 |
ref.invoke(call);
|
|
178 |
ref.done(call);
|
|
179 |
} catch (java.lang.RuntimeException e) {
|
|
180 |
throw e;
|
|
181 |
} catch (java.rmi.RemoteException e) {
|
|
182 |
throw e;
|
|
183 |
} catch (java.rmi.NotBoundException e) {
|
|
184 |
throw e;
|
|
185 |
} catch (java.lang.Exception e) {
|
|
186 |
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
|
|
187 |
}
|
|
188 |
}
|
|
189 |
}
|