Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mobile
Path: blob/master/test/jdk/java/rmi/registry/interfaceHash/ReferenceRegistryStub.java
41153 views
1
/*
2
* Copyright (c) 2001, 2008, 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.
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 Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20
* or visit www.oracle.com if you need additional information or have any
21
* questions.
22
*/
23
24
public final class ReferenceRegistryStub
25
extends java.rmi.server.RemoteStub
26
implements java.rmi.registry.Registry, java.rmi.Remote
27
{
28
private static final java.rmi.server.Operation[] operations = {
29
new java.rmi.server.Operation("void bind(java.lang.String, java.rmi.Remote)"),
30
new java.rmi.server.Operation("java.lang.String list()[]"),
31
new java.rmi.server.Operation("java.rmi.Remote lookup(java.lang.String)"),
32
new java.rmi.server.Operation("void rebind(java.lang.String, java.rmi.Remote)"),
33
new java.rmi.server.Operation("void unbind(java.lang.String)")
34
};
35
36
private static final long interfaceHash = 4905912898345647071L;
37
38
// constructors
39
public ReferenceRegistryStub() {
40
super();
41
}
42
public ReferenceRegistryStub(java.rmi.server.RemoteRef ref) {
43
super(ref);
44
}
45
46
// methods from remote interfaces
47
48
// implementation of bind(String, Remote)
49
public void bind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
50
throws java.rmi.AccessException, java.rmi.AlreadyBoundException, java.rmi.RemoteException
51
{
52
try {
53
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 0, interfaceHash);
54
try {
55
java.io.ObjectOutput out = call.getOutputStream();
56
out.writeObject($param_String_1);
57
out.writeObject($param_Remote_2);
58
} catch (java.io.IOException e) {
59
throw new java.rmi.MarshalException("error marshalling arguments", e);
60
}
61
ref.invoke(call);
62
ref.done(call);
63
} catch (java.lang.RuntimeException e) {
64
throw e;
65
} catch (java.rmi.RemoteException e) {
66
throw e;
67
} catch (java.rmi.AlreadyBoundException e) {
68
throw e;
69
} catch (java.lang.Exception e) {
70
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
71
}
72
}
73
74
// implementation of list()
75
public java.lang.String[] list()
76
throws java.rmi.AccessException, java.rmi.RemoteException
77
{
78
try {
79
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 1, interfaceHash);
80
ref.invoke(call);
81
java.lang.String[] $result;
82
try {
83
java.io.ObjectInput in = call.getInputStream();
84
$result = (java.lang.String[]) in.readObject();
85
} catch (java.io.IOException e) {
86
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
87
} catch (java.lang.ClassNotFoundException e) {
88
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
89
} finally {
90
ref.done(call);
91
}
92
return $result;
93
} catch (java.lang.RuntimeException e) {
94
throw e;
95
} catch (java.rmi.RemoteException e) {
96
throw e;
97
} catch (java.lang.Exception e) {
98
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
99
}
100
}
101
102
// implementation of lookup(String)
103
public java.rmi.Remote lookup(java.lang.String $param_String_1)
104
throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
105
{
106
try {
107
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 2, interfaceHash);
108
try {
109
java.io.ObjectOutput out = call.getOutputStream();
110
out.writeObject($param_String_1);
111
} catch (java.io.IOException e) {
112
throw new java.rmi.MarshalException("error marshalling arguments", e);
113
}
114
ref.invoke(call);
115
java.rmi.Remote $result;
116
try {
117
java.io.ObjectInput in = call.getInputStream();
118
$result = (java.rmi.Remote) in.readObject();
119
} catch (java.io.IOException e) {
120
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
121
} catch (java.lang.ClassNotFoundException e) {
122
throw new java.rmi.UnmarshalException("error unmarshalling return", e);
123
} finally {
124
ref.done(call);
125
}
126
return $result;
127
} catch (java.lang.RuntimeException e) {
128
throw e;
129
} catch (java.rmi.RemoteException e) {
130
throw e;
131
} catch (java.rmi.NotBoundException e) {
132
throw e;
133
} catch (java.lang.Exception e) {
134
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
135
}
136
}
137
138
// implementation of rebind(String, Remote)
139
public void rebind(java.lang.String $param_String_1, java.rmi.Remote $param_Remote_2)
140
throws java.rmi.AccessException, java.rmi.RemoteException
141
{
142
try {
143
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 3, interfaceHash);
144
try {
145
java.io.ObjectOutput out = call.getOutputStream();
146
out.writeObject($param_String_1);
147
out.writeObject($param_Remote_2);
148
} catch (java.io.IOException e) {
149
throw new java.rmi.MarshalException("error marshalling arguments", e);
150
}
151
ref.invoke(call);
152
ref.done(call);
153
} catch (java.lang.RuntimeException e) {
154
throw e;
155
} catch (java.rmi.RemoteException e) {
156
throw e;
157
} catch (java.lang.Exception e) {
158
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
159
}
160
}
161
162
// implementation of unbind(String)
163
public void unbind(java.lang.String $param_String_1)
164
throws java.rmi.AccessException, java.rmi.NotBoundException, java.rmi.RemoteException
165
{
166
try {
167
java.rmi.server.RemoteCall call = ref.newCall((java.rmi.server.RemoteObject) this, operations, 4, interfaceHash);
168
try {
169
java.io.ObjectOutput out = call.getOutputStream();
170
out.writeObject($param_String_1);
171
} catch (java.io.IOException e) {
172
throw new java.rmi.MarshalException("error marshalling arguments", e);
173
}
174
ref.invoke(call);
175
ref.done(call);
176
} catch (java.lang.RuntimeException e) {
177
throw e;
178
} catch (java.rmi.RemoteException e) {
179
throw e;
180
} catch (java.rmi.NotBoundException e) {
181
throw e;
182
} catch (java.lang.Exception e) {
183
throw new java.rmi.UnexpectedException("undeclared checked exception", e);
184
}
185
}
186
}
187
188