1:
37:
38:
39:
40:
41: package ;
42:
43: public final class RegistryImpl_Stub
44: extends java.rmi.server.RemoteStub
45: implements java.rmi.registry.Registry
46: {
47: private static final long serialVersionUID = 2L;
48:
49: private static final long interfaceHash = 4905912898345647071L;
50:
51: private static boolean useNewInvoke;
52:
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)")
59: };
60:
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;
66:
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});
76:
77: }
78: catch (java.lang.NoSuchMethodException e) {
79: useNewInvoke = false;
80: }
81: }
82:
83: public RegistryImpl_Stub() {
84: super();
85: }
86: public RegistryImpl_Stub(java.rmi.server.RemoteRef ref) {
87: super(ref);
88: }
89:
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);
94: }
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);
101: }
102: catch (java.io.IOException e) {
103: throw new java.rmi.MarshalException("error marshalling arguments", e);
104: }
105: ref.invoke(call);
106: try {
107: java.io.ObjectInput in = call.getInputStream();
108: }
109: catch (java.io.IOException e) {
110: throw new java.rmi.UnmarshalException("error unmarshalling return", e);
111: }
112: finally {
113: ref.done(call);
114: }
115: }
116: }
117: catch (java.rmi.AccessException e) {
118: throw e;
119: }
120: catch (java.rmi.AlreadyBoundException e) {
121: throw e;
122: }
123: catch (java.rmi.RemoteException e) {
124: throw e;
125: }
126: catch (java.lang.Exception e) {
127: throw new java.rmi.UnexpectedException("undeclared checked exception", e);
128: }
129: }
130:
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);
136: }
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();
141: }
142: catch (java.io.IOException e) {
143: throw new java.rmi.MarshalException("error marshalling arguments", e);
144: }
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);
151: }
152: catch (java.io.IOException e) {
153: throw new java.rmi.UnmarshalException("error unmarshalling return", e);
154: }
155: finally {
156: ref.done(call);
157: }
158: }
159: }
160: catch (java.rmi.AccessException e) {
161: throw e;
162: }
163: catch (java.rmi.RemoteException e) {
164: throw e;
165: }
166: catch (java.lang.Exception e) {
167: throw new java.rmi.UnexpectedException("undeclared checked exception", e);
168: }
169: }
170:
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);
176: }
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);
182: }
183: catch (java.io.IOException e) {
184: throw new java.rmi.MarshalException("error marshalling arguments", e);
185: }
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);
192: }
193: catch (java.io.IOException e) {
194: throw new java.rmi.UnmarshalException("error unmarshalling return", e);
195: }
196: finally {
197: ref.done(call);
198: }
199: }
200: }
201: catch (java.rmi.AccessException e) {
202: throw e;
203: }
204: catch (java.rmi.NotBoundException e) {
205: throw e;
206: }
207: catch (java.rmi.RemoteException e) {
208: throw e;
209: }
210: catch (java.lang.Exception e) {
211: throw new java.rmi.UnexpectedException("undeclared checked exception", e);
212: }
213: }
214:
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);
219: }
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);
226: }
227: catch (java.io.IOException e) {
228: throw new java.rmi.MarshalException("error marshalling arguments", e);
229: }
230: ref.invoke(call);
231: try {
232: java.io.ObjectInput in = call.getInputStream();
233: }
234: catch (java.io.IOException e) {
235: throw new java.rmi.UnmarshalException("error unmarshalling return", e);
236: }
237: finally {
238: ref.done(call);
239: }
240: }
241: }
242: catch (java.rmi.AccessException e) {
243: throw e;
244: }
245: catch (java.rmi.RemoteException e) {
246: throw e;
247: }
248: catch (java.lang.Exception e) {
249: throw new java.rmi.UnexpectedException("undeclared checked exception", e);
250: }
251: }
252:
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);
257: }
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);
263: }
264: catch (java.io.IOException e) {
265: throw new java.rmi.MarshalException("error marshalling arguments", e);
266: }
267: ref.invoke(call);
268: try {
269: java.io.ObjectInput in = call.getInputStream();
270: }
271: catch (java.io.IOException e) {
272: throw new java.rmi.UnmarshalException("error unmarshalling return", e);
273: }
274: finally {
275: ref.done(call);
276: }
277: }
278: }
279: catch (java.rmi.AccessException e) {
280: throw e;
281: }
282: catch (java.rmi.NotBoundException e) {
283: throw e;
284: }
285: catch (java.rmi.RemoteException e) {
286: throw e;
287: }
288: catch (java.lang.Exception e) {
289: throw new java.rmi.UnexpectedException("undeclared checked exception", e);
290: }
291: }
292:
293: }