equal
deleted
inserted
replaced
25 |
25 |
26 |
26 |
27 package sun.rmi.registry; |
27 package sun.rmi.registry; |
28 |
28 |
29 import java.io.IOException; |
29 import java.io.IOException; |
30 import java.io.InputStream; |
|
31 import java.rmi.AccessException; |
|
32 import java.rmi.server.RemoteCall; |
|
33 |
30 |
34 import sun.rmi.transport.Connection; |
|
35 import sun.rmi.transport.StreamRemoteCall; |
31 import sun.rmi.transport.StreamRemoteCall; |
36 import sun.rmi.transport.tcp.TCPConnection; |
|
37 |
32 |
38 /** |
33 /** |
39 * Skeleton to dispatch RegistryImpl methods. |
34 * Skeleton to dispatch RegistryImpl methods. |
40 * Originally generated by RMIC but frozen to match the stubs. |
35 * Originally generated by RMIC but frozen to match the stubs. |
41 */ |
36 */ |
54 |
49 |
55 public java.rmi.server.Operation[] getOperations() { |
50 public java.rmi.server.Operation[] getOperations() { |
56 return operations.clone(); |
51 return operations.clone(); |
57 } |
52 } |
58 |
53 |
59 public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash) |
54 public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall remoteCall, int opnum, long hash) |
60 throws java.lang.Exception { |
55 throws java.lang.Exception { |
61 if (opnum < 0) { |
56 if (opnum < 0) { |
62 if (hash == 7583982177005850366L) { |
57 if (hash == 7583982177005850366L) { |
63 opnum = 0; |
58 opnum = 0; |
64 } else if (hash == 2571371476350237748L) { |
59 } else if (hash == 2571371476350237748L) { |
76 if (hash != interfaceHash) |
71 if (hash != interfaceHash) |
77 throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch"); |
72 throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch"); |
78 } |
73 } |
79 |
74 |
80 sun.rmi.registry.RegistryImpl server = (sun.rmi.registry.RegistryImpl) obj; |
75 sun.rmi.registry.RegistryImpl server = (sun.rmi.registry.RegistryImpl) obj; |
|
76 StreamRemoteCall call = (StreamRemoteCall) remoteCall; |
81 switch (opnum) { |
77 switch (opnum) { |
82 case 0: // bind(String, Remote) |
78 case 0: // bind(String, Remote) |
83 { |
79 { |
84 // Check access before reading the arguments |
80 // Check access before reading the arguments |
85 RegistryImpl.checkAccess("Registry.bind"); |
81 RegistryImpl.checkAccess("Registry.bind"); |
88 java.rmi.Remote $param_Remote_2; |
84 java.rmi.Remote $param_Remote_2; |
89 try { |
85 try { |
90 java.io.ObjectInput in = call.getInputStream(); |
86 java.io.ObjectInput in = call.getInputStream(); |
91 $param_String_1 = (java.lang.String) in.readObject(); |
87 $param_String_1 = (java.lang.String) in.readObject(); |
92 $param_Remote_2 = (java.rmi.Remote) in.readObject(); |
88 $param_Remote_2 = (java.rmi.Remote) in.readObject(); |
93 } catch (java.io.IOException | java.lang.ClassNotFoundException e) { |
89 } catch (ClassCastException | IOException | ClassNotFoundException e) { |
|
90 call.discardPendingRefs(); |
94 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
91 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
95 } finally { |
92 } finally { |
96 call.releaseInputStream(); |
93 call.releaseInputStream(); |
97 } |
94 } |
98 server.bind($param_String_1, $param_Remote_2); |
95 server.bind($param_String_1, $param_Remote_2); |
121 { |
118 { |
122 java.lang.String $param_String_1; |
119 java.lang.String $param_String_1; |
123 try { |
120 try { |
124 java.io.ObjectInput in = call.getInputStream(); |
121 java.io.ObjectInput in = call.getInputStream(); |
125 $param_String_1 = (java.lang.String) in.readObject(); |
122 $param_String_1 = (java.lang.String) in.readObject(); |
126 } catch (java.io.IOException | java.lang.ClassNotFoundException e) { |
123 } catch (ClassCastException | IOException | ClassNotFoundException e) { |
|
124 call.discardPendingRefs(); |
127 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
125 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
128 } finally { |
126 } finally { |
129 call.releaseInputStream(); |
127 call.releaseInputStream(); |
130 } |
128 } |
131 java.rmi.Remote $result = server.lookup($param_String_1); |
129 java.rmi.Remote $result = server.lookup($param_String_1); |
147 java.rmi.Remote $param_Remote_2; |
145 java.rmi.Remote $param_Remote_2; |
148 try { |
146 try { |
149 java.io.ObjectInput in = call.getInputStream(); |
147 java.io.ObjectInput in = call.getInputStream(); |
150 $param_String_1 = (java.lang.String) in.readObject(); |
148 $param_String_1 = (java.lang.String) in.readObject(); |
151 $param_Remote_2 = (java.rmi.Remote) in.readObject(); |
149 $param_Remote_2 = (java.rmi.Remote) in.readObject(); |
152 } catch (java.io.IOException | java.lang.ClassNotFoundException e) { |
150 } catch (ClassCastException | IOException | java.lang.ClassNotFoundException e) { |
|
151 call.discardPendingRefs(); |
153 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
152 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
154 } finally { |
153 } finally { |
155 call.releaseInputStream(); |
154 call.releaseInputStream(); |
156 } |
155 } |
157 server.rebind($param_String_1, $param_Remote_2); |
156 server.rebind($param_String_1, $param_Remote_2); |
170 |
169 |
171 java.lang.String $param_String_1; |
170 java.lang.String $param_String_1; |
172 try { |
171 try { |
173 java.io.ObjectInput in = call.getInputStream(); |
172 java.io.ObjectInput in = call.getInputStream(); |
174 $param_String_1 = (java.lang.String) in.readObject(); |
173 $param_String_1 = (java.lang.String) in.readObject(); |
175 } catch (java.io.IOException | java.lang.ClassNotFoundException e) { |
174 } catch (ClassCastException | IOException | ClassNotFoundException e) { |
|
175 call.discardPendingRefs(); |
176 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
176 throw new java.rmi.UnmarshalException("error unmarshalling arguments", e); |
177 } finally { |
177 } finally { |
178 call.releaseInputStream(); |
178 call.releaseInputStream(); |
179 } |
179 } |
180 server.unbind($param_String_1); |
180 server.unbind($param_String_1); |