author | serb |
Thu, 12 Sep 2019 22:20:35 -0700 | |
changeset 58323 | 7b3101216e61 |
parent 50774 | 662f66f9c9e2 |
child 58609 | fbfc72ec8e6b |
permissions | -rw-r--r-- |
2 | 1 |
/* |
45029 | 2 |
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved. |
2 | 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 |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 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 |
* |
|
5506 | 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. |
|
2 | 24 |
*/ |
25 |
package java.rmi.server; |
|
26 |
||
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
27 |
import java.io.ObjectInputFilter; |
2 | 28 |
import java.rmi.*; |
29 |
import sun.rmi.server.UnicastServerRef; |
|
30 |
import sun.rmi.server.UnicastServerRef2; |
|
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
31 |
import sun.rmi.transport.LiveRef; |
2 | 32 |
|
33 |
/** |
|
34 |
* Used for exporting a remote object with JRMP and obtaining a stub |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
35 |
* that communicates to the remote object. Stubs are either generated |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
36 |
* at runtime using dynamic proxy objects, or they are generated statically |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
37 |
* at build time, typically using the {@code rmic} tool. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
38 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
39 |
* <p><strong>Deprecated: Static Stubs.</strong> <em>Support for statically |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
40 |
* generated stubs is deprecated. This includes the API in this class that |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
41 |
* requires the use of static stubs, as well as the runtime support for |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
42 |
* loading static stubs. Generating stubs dynamically is preferred, using one |
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
43 |
* of the non-deprecated ways of exporting objects as listed below. Do |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
44 |
* not run {@code rmic} to generate static stub classes. It is unnecessary, and |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
45 |
* it is also deprecated.</em> |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
46 |
* |
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
47 |
* <p>There are eight ways to export remote objects: |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
48 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
49 |
* <ol> |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
50 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
51 |
* <li>Subclassing {@code UnicastRemoteObject} and calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
52 |
* {@link #UnicastRemoteObject()} constructor. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
53 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
54 |
* <li>Subclassing {@code UnicastRemoteObject} and calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
55 |
* {@link #UnicastRemoteObject(int) UnicastRemoteObject(port)} constructor. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
56 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
57 |
* <li>Subclassing {@code UnicastRemoteObject} and calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
58 |
* {@link #UnicastRemoteObject(int, RMIClientSocketFactory, RMIServerSocketFactory) |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
59 |
* UnicastRemoteObject(port, csf, ssf)} constructor. |
2 | 60 |
* |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
61 |
* <li>Calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
62 |
* {@link #exportObject(Remote) exportObject(Remote)} method. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
63 |
* <strong>Deprecated.</strong> |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
64 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
65 |
* <li>Calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
66 |
* {@link #exportObject(Remote, int) exportObject(Remote, port)} method. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
67 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
68 |
* <li>Calling the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
69 |
* {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory) |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
70 |
* exportObject(Remote, port, csf, ssf)} method. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
71 |
* |
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
72 |
* <li>Calling the |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
73 |
* {@link #exportObject(Remote, int, ObjectInputFilter) exportObject(Remote, port, filter)} method. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
74 |
* |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
75 |
* <li>Calling the |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
76 |
* {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory, ObjectInputFilter) |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
77 |
* exportObject(Remote, port, csf, ssf, filter)} method. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
78 |
* |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
79 |
* </ol> |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
80 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
81 |
* <p>The fourth technique, {@link #exportObject(Remote)}, |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
82 |
* always uses statically generated stubs and is deprecated. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
83 |
* |
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
84 |
* <p>The other techniques all use the following approach: if the |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
85 |
* {@code java.rmi.server.ignoreStubClasses} property is {@code true} |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
86 |
* (case insensitive) or if a static stub cannot be found, stubs are generated |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
87 |
* dynamically using {@link java.lang.reflect.Proxy Proxy} objects. Otherwise, |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
88 |
* static stubs are used. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
89 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
90 |
* <p>The default value of the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
91 |
* {@code java.rmi.server.ignoreStubClasses} property is {@code false}. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
92 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
93 |
* <p>Statically generated stubs are typically pregenerated from the |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
94 |
* remote object's class using the {@code rmic} tool. A static stub is |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
95 |
* loaded and an instance of that stub class is constructed as described |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
96 |
* below. |
2 | 97 |
* |
21334 | 98 |
* <ul> |
2 | 99 |
* |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
100 |
* <li>A "root class" is determined as follows: if the remote object's |
2 | 101 |
* class directly implements an interface that extends {@link Remote}, then |
102 |
* the remote object's class is the root class; otherwise, the root class is |
|
103 |
* the most derived superclass of the remote object's class that directly |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
104 |
* implements an interface that extends {@code Remote}. |
2 | 105 |
* |
106 |
* <li>The name of the stub class to load is determined by concatenating |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
107 |
* the binary name of the root class with the suffix {@code _Stub}. |
2 | 108 |
* |
109 |
* <li>The stub class is loaded by name using the class loader of the root |
|
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
110 |
* class. The stub class must be public, it must extend {@link RemoteStub}, it must |
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
111 |
* reside in a package that is exported to at least the {@code java.rmi} module, and it |
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
112 |
* must have a public constructor that has one parameter of type {@link RemoteRef}. |
2 | 113 |
* |
114 |
* <li>Finally, an instance of the stub class is constructed with a |
|
115 |
* {@link RemoteRef}. |
|
116 |
* |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
117 |
* <li>If the appropriate stub class could not be found, or if the stub class |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
118 |
* could not be loaded, or if a problem occurs creating the stub instance, a |
2 | 119 |
* {@link StubNotFoundException} is thrown. |
120 |
* |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
121 |
* </ul> |
2 | 122 |
* |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
123 |
* <p>Stubs are dynamically generated by constructing an instance of |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
124 |
* a {@link java.lang.reflect.Proxy Proxy} with the following characteristics: |
2 | 125 |
* |
126 |
* <ul> |
|
127 |
* |
|
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
128 |
* <li>The proxy's class is defined according to the specifications for the |
50774
662f66f9c9e2
8201610: Broken link on the page api/java.rmi/java/rmi/server/UnicastRemoteObject.html
smarks
parents:
47216
diff
changeset
|
129 |
* <a href="{@docRoot}/java.base/java/lang/reflect/Proxy.html#membership"> |
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
130 |
* {@code Proxy} |
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
131 |
* </a> |
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
132 |
* class, using the class loader of the remote object's class. |
2 | 133 |
* |
134 |
* <li>The proxy implements all the remote interfaces implemented by the |
|
135 |
* remote object's class. |
|
136 |
* |
|
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
137 |
* <li>Each remote interface must either be public and reside in a package that is |
44545
83b611b88ac8
8177530: Module system implementation refresh (4/2017)
alanb
parents:
43690
diff
changeset
|
138 |
* {@linkplain Module#isExported(String,Module) exported} |
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
139 |
* to at least the {@code java.rmi} module, or it must reside in a package that is |
44545
83b611b88ac8
8177530: Module system implementation refresh (4/2017)
alanb
parents:
43690
diff
changeset
|
140 |
* {@linkplain Module#isOpen(String,Module) open} |
43690
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
141 |
* to at least the {@code java.rmi} module. |
e8cdf30d90c4
8044626: Update RMI specifications to reflect modularization changes
smarks
parents:
41232
diff
changeset
|
142 |
* |
2 | 143 |
* <li>The proxy's invocation handler is a {@link |
144 |
* RemoteObjectInvocationHandler} instance constructed with a |
|
145 |
* {@link RemoteRef}. |
|
146 |
* |
|
147 |
* <li>If the proxy could not be created, a {@link StubNotFoundException} |
|
148 |
* will be thrown. |
|
149 |
* |
|
150 |
* </ul> |
|
151 |
* |
|
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
152 |
* <p> |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
153 |
* Exported remote objects receive method invocations from the stubs |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
154 |
* as described in the RMI specification. Each invocation's operation and |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
155 |
* parameters are unmarshaled using a custom {@link java.io.ObjectInputStream}. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
156 |
* If an {@link ObjectInputFilter} is provided and is not {@code null} when the object |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
157 |
* is exported, it is used to filter the parameters as they are unmarshaled from the stream. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
158 |
* The filter is used for all invocations and all parameters regardless of |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
159 |
* the method being invoked or the parameter values. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
160 |
* If no filter is provided or is {@code null} for the exported object then the |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
161 |
* {@code ObjectInputStream} default filter, if any, is used. The default filter is |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
162 |
* configured with {@link ObjectInputFilter.Config#setSerialFilter(ObjectInputFilter) |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
163 |
* ObjectInputFilter.Config.setSerialFilter}. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
164 |
* If the filter rejects any of the parameters, the {@code InvalidClassException} |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
165 |
* thrown by {@code ObjectInputStream} is reported as the cause of an |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
166 |
* {@link UnmarshalException}. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
167 |
* |
19201
80230405e311
8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
smarks
parents:
5506
diff
changeset
|
168 |
* @implNote |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
169 |
* Depending upon which constructor or static method is used for exporting an |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
170 |
* object, {@link RMISocketFactory} may be used for creating sockets. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
171 |
* By default, server sockets created by {@link RMISocketFactory} |
19201
80230405e311
8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
smarks
parents:
5506
diff
changeset
|
172 |
* listen on all network interfaces. See the |
80230405e311
8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
smarks
parents:
5506
diff
changeset
|
173 |
* {@link RMISocketFactory} class and the section |
45029 | 174 |
* <a href="{@docRoot}/../specs/rmi/server.html#rmi-socket-factories">RMI Socket Factories</a> |
19201
80230405e311
8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
smarks
parents:
5506
diff
changeset
|
175 |
* in the |
45029 | 176 |
* <a href="{@docRoot}/../specs/rmi/index.html">Java RMI Specification</a>. |
19201
80230405e311
8020854: change RMI javadocs to specify that remote objects are exported to the wildcard address
smarks
parents:
5506
diff
changeset
|
177 |
* |
2 | 178 |
* @author Ann Wollrath |
179 |
* @author Peter Jones |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
21421
diff
changeset
|
180 |
* @since 1.1 |
2 | 181 |
**/ |
182 |
public class UnicastRemoteObject extends RemoteServer { |
|
183 |
||
184 |
/** |
|
185 |
* @serial port number on which to export object |
|
186 |
*/ |
|
187 |
private int port = 0; |
|
188 |
||
189 |
/** |
|
190 |
* @serial client-side socket factory (if any) |
|
191 |
*/ |
|
192 |
private RMIClientSocketFactory csf = null; |
|
193 |
||
194 |
/** |
|
195 |
* @serial server-side socket factory (if any) to use when |
|
196 |
* exporting object |
|
197 |
*/ |
|
198 |
private RMIServerSocketFactory ssf = null; |
|
199 |
||
200 |
/* indicate compatibility with JDK 1.1.x version of class */ |
|
201 |
private static final long serialVersionUID = 4974527148936298033L; |
|
202 |
||
203 |
/** |
|
204 |
* Creates and exports a new UnicastRemoteObject object using an |
|
205 |
* anonymous port. |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
206 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
207 |
* <p>The object is exported with a server socket |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
208 |
* created using the {@link RMISocketFactory} class. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
209 |
* |
2 | 210 |
* @throws RemoteException if failed to export object |
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
21421
diff
changeset
|
211 |
* @since 1.1 |
2 | 212 |
*/ |
213 |
protected UnicastRemoteObject() throws RemoteException |
|
214 |
{ |
|
215 |
this(0); |
|
216 |
} |
|
217 |
||
218 |
/** |
|
219 |
* Creates and exports a new UnicastRemoteObject object using the |
|
220 |
* particular supplied port. |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
221 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
222 |
* <p>The object is exported with a server socket |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
223 |
* created using the {@link RMISocketFactory} class. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
224 |
* |
2 | 225 |
* @param port the port number on which the remote object receives calls |
226 |
* (if <code>port</code> is zero, an anonymous port is chosen) |
|
227 |
* @throws RemoteException if failed to export object |
|
228 |
* @since 1.2 |
|
229 |
*/ |
|
230 |
protected UnicastRemoteObject(int port) throws RemoteException |
|
231 |
{ |
|
232 |
this.port = port; |
|
233 |
exportObject((Remote) this, port); |
|
234 |
} |
|
235 |
||
236 |
/** |
|
237 |
* Creates and exports a new UnicastRemoteObject object using the |
|
238 |
* particular supplied port and socket factories. |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
239 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
240 |
* <p>Either socket factory may be {@code null}, in which case |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
241 |
* the corresponding client or server socket creation method of |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
242 |
* {@link RMISocketFactory} is used instead. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
243 |
* |
2 | 244 |
* @param port the port number on which the remote object receives calls |
245 |
* (if <code>port</code> is zero, an anonymous port is chosen) |
|
246 |
* @param csf the client-side socket factory for making calls to the |
|
247 |
* remote object |
|
248 |
* @param ssf the server-side socket factory for receiving remote calls |
|
249 |
* @throws RemoteException if failed to export object |
|
250 |
* @since 1.2 |
|
251 |
*/ |
|
252 |
protected UnicastRemoteObject(int port, |
|
253 |
RMIClientSocketFactory csf, |
|
254 |
RMIServerSocketFactory ssf) |
|
255 |
throws RemoteException |
|
256 |
{ |
|
257 |
this.port = port; |
|
258 |
this.csf = csf; |
|
259 |
this.ssf = ssf; |
|
260 |
exportObject((Remote) this, port, csf, ssf); |
|
261 |
} |
|
262 |
||
263 |
/** |
|
264 |
* Re-export the remote object when it is deserialized. |
|
265 |
*/ |
|
266 |
private void readObject(java.io.ObjectInputStream in) |
|
267 |
throws java.io.IOException, java.lang.ClassNotFoundException |
|
268 |
{ |
|
269 |
in.defaultReadObject(); |
|
270 |
reexport(); |
|
271 |
} |
|
272 |
||
273 |
/** |
|
274 |
* Returns a clone of the remote object that is distinct from |
|
275 |
* the original. |
|
276 |
* |
|
277 |
* @exception CloneNotSupportedException if clone failed due to |
|
278 |
* a RemoteException. |
|
279 |
* @return the new remote object |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
21421
diff
changeset
|
280 |
* @since 1.1 |
2 | 281 |
*/ |
282 |
public Object clone() throws CloneNotSupportedException |
|
283 |
{ |
|
284 |
try { |
|
285 |
UnicastRemoteObject cloned = (UnicastRemoteObject) super.clone(); |
|
286 |
cloned.reexport(); |
|
287 |
return cloned; |
|
288 |
} catch (RemoteException e) { |
|
289 |
throw new ServerCloneException("Clone failed", e); |
|
290 |
} |
|
291 |
} |
|
292 |
||
293 |
/* |
|
294 |
* Exports this UnicastRemoteObject using its initialized fields because |
|
295 |
* its creation bypassed running its constructors (via deserialization |
|
296 |
* or cloning, for example). |
|
297 |
*/ |
|
298 |
private void reexport() throws RemoteException |
|
299 |
{ |
|
300 |
if (csf == null && ssf == null) { |
|
301 |
exportObject((Remote) this, port); |
|
302 |
} else { |
|
303 |
exportObject((Remote) this, port, csf, ssf); |
|
304 |
} |
|
305 |
} |
|
306 |
||
307 |
/** |
|
308 |
* Exports the remote object to make it available to receive incoming |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
309 |
* calls using an anonymous port. This method will always return a |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
310 |
* statically generated stub. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
311 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
312 |
* <p>The object is exported with a server socket |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
313 |
* created using the {@link RMISocketFactory} class. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
314 |
* |
2 | 315 |
* @param obj the remote object to be exported |
316 |
* @return remote object stub |
|
317 |
* @exception RemoteException if export fails |
|
24865
09b1d992ca72
8044740: Convert all JDK versions used in @since tag to 1.n[.n] in jdk repo
henryjen
parents:
21421
diff
changeset
|
318 |
* @since 1.1 |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
319 |
* @deprecated This method is deprecated because it supports only static stubs. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
320 |
* Use {@link #exportObject(Remote, int) exportObject(Remote, port)} or |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
321 |
* {@link #exportObject(Remote, int, RMIClientSocketFactory, RMIServerSocketFactory) |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
322 |
* exportObject(Remote, port, csf, ssf)} |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
323 |
* instead. |
2 | 324 |
*/ |
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
325 |
@Deprecated |
2 | 326 |
public static RemoteStub exportObject(Remote obj) |
327 |
throws RemoteException |
|
328 |
{ |
|
329 |
/* |
|
330 |
* Use UnicastServerRef constructor passing the boolean value true |
|
331 |
* to indicate that only a generated stub class should be used. A |
|
332 |
* generated stub class must be used instead of a dynamic proxy |
|
333 |
* because the return value of this method is RemoteStub which a |
|
334 |
* dynamic proxy class cannot extend. |
|
335 |
*/ |
|
336 |
return (RemoteStub) exportObject(obj, new UnicastServerRef(true)); |
|
337 |
} |
|
338 |
||
339 |
/** |
|
340 |
* Exports the remote object to make it available to receive incoming |
|
341 |
* calls, using the particular supplied port. |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
342 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
343 |
* <p>The object is exported with a server socket |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
344 |
* created using the {@link RMISocketFactory} class. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
345 |
* |
2 | 346 |
* @param obj the remote object to be exported |
347 |
* @param port the port to export the object on |
|
348 |
* @return remote object stub |
|
349 |
* @exception RemoteException if export fails |
|
350 |
* @since 1.2 |
|
351 |
*/ |
|
352 |
public static Remote exportObject(Remote obj, int port) |
|
353 |
throws RemoteException |
|
354 |
{ |
|
355 |
return exportObject(obj, new UnicastServerRef(port)); |
|
356 |
} |
|
357 |
||
358 |
/** |
|
359 |
* Exports the remote object to make it available to receive incoming |
|
360 |
* calls, using a transport specified by the given socket factory. |
|
21421
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
361 |
* |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
362 |
* <p>Either socket factory may be {@code null}, in which case |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
363 |
* the corresponding client or server socket creation method of |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
364 |
* {@link RMISocketFactory} is used instead. |
aadfbd8b351b
8023863: deprecate support for statically-generated stubs from RMI (JRMP)
smarks
parents:
21334
diff
changeset
|
365 |
* |
2 | 366 |
* @param obj the remote object to be exported |
367 |
* @param port the port to export the object on |
|
368 |
* @param csf the client-side socket factory for making calls to the |
|
369 |
* remote object |
|
370 |
* @param ssf the server-side socket factory for receiving remote calls |
|
371 |
* @return remote object stub |
|
372 |
* @exception RemoteException if export fails |
|
373 |
* @since 1.2 |
|
374 |
*/ |
|
375 |
public static Remote exportObject(Remote obj, int port, |
|
376 |
RMIClientSocketFactory csf, |
|
377 |
RMIServerSocketFactory ssf) |
|
378 |
throws RemoteException |
|
379 |
{ |
|
380 |
||
381 |
return exportObject(obj, new UnicastServerRef2(port, csf, ssf)); |
|
382 |
} |
|
383 |
||
384 |
/** |
|
41232
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
385 |
* Exports the remote object to make it available to receive incoming |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
386 |
* calls, using the particular supplied port |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
387 |
* and {@linkplain ObjectInputFilter filter}. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
388 |
* |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
389 |
* <p>The object is exported with a server socket |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
390 |
* created using the {@link RMISocketFactory} class. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
391 |
* |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
392 |
* @param obj the remote object to be exported |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
393 |
* @param port the port to export the object on |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
394 |
* @param filter an ObjectInputFilter applied when deserializing invocation arguments; |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
395 |
* may be {@code null} |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
396 |
* @return remote object stub |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
397 |
* @exception RemoteException if export fails |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
398 |
* @since 9 |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
399 |
*/ |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
400 |
public static Remote exportObject(Remote obj, int port, |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
401 |
ObjectInputFilter filter) |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
402 |
throws RemoteException |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
403 |
{ |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
404 |
return exportObject(obj, new UnicastServerRef(new LiveRef(port), filter)); |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
405 |
} |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
406 |
|
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
407 |
/** |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
408 |
* Exports the remote object to make it available to receive incoming |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
409 |
* calls, using a transport specified by the given socket factory |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
410 |
* and {@linkplain ObjectInputFilter filter}. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
411 |
* |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
412 |
* <p>Either socket factory may be {@code null}, in which case |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
413 |
* the corresponding client or server socket creation method of |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
414 |
* {@link RMISocketFactory} is used instead. |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
415 |
* |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
416 |
* @param obj the remote object to be exported |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
417 |
* @param port the port to export the object on |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
418 |
* @param csf the client-side socket factory for making calls to the |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
419 |
* remote object |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
420 |
* @param ssf the server-side socket factory for receiving remote calls |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
421 |
* @param filter an ObjectInputFilter applied when deserializing invocation arguments; |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
422 |
* may be {@code null} |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
423 |
* @return remote object stub |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
424 |
* @exception RemoteException if export fails |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
425 |
* @since 9 |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
426 |
*/ |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
427 |
public static Remote exportObject(Remote obj, int port, |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
428 |
RMIClientSocketFactory csf, |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
429 |
RMIServerSocketFactory ssf, |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
430 |
ObjectInputFilter filter) |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
431 |
throws RemoteException |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
432 |
{ |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
433 |
return exportObject(obj, new UnicastServerRef2(port, csf, ssf, filter)); |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
434 |
} |
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
435 |
|
5da543633b3b
8165261: RMI API to export an object with a serialization filter
rriggs
parents:
25859
diff
changeset
|
436 |
/** |
2 | 437 |
* Removes the remote object, obj, from the RMI runtime. If |
438 |
* successful, the object can no longer accept incoming RMI calls. |
|
439 |
* If the force parameter is true, the object is forcibly unexported |
|
440 |
* even if there are pending calls to the remote object or the |
|
441 |
* remote object still has calls in progress. If the force |
|
442 |
* parameter is false, the object is only unexported if there are |
|
443 |
* no pending or in progress calls to the object. |
|
444 |
* |
|
445 |
* @param obj the remote object to be unexported |
|
446 |
* @param force if true, unexports the object even if there are |
|
447 |
* pending or in-progress calls; if false, only unexports the object |
|
448 |
* if there are no pending or in-progress calls |
|
449 |
* @return true if operation is successful, false otherwise |
|
450 |
* @exception NoSuchObjectException if the remote object is not |
|
451 |
* currently exported |
|
452 |
* @since 1.2 |
|
453 |
*/ |
|
454 |
public static boolean unexportObject(Remote obj, boolean force) |
|
455 |
throws java.rmi.NoSuchObjectException |
|
456 |
{ |
|
457 |
return sun.rmi.transport.ObjectTable.unexportObject(obj, force); |
|
458 |
} |
|
459 |
||
460 |
/** |
|
461 |
* Exports the specified object using the specified server ref. |
|
462 |
*/ |
|
463 |
private static Remote exportObject(Remote obj, UnicastServerRef sref) |
|
464 |
throws RemoteException |
|
465 |
{ |
|
466 |
// if obj extends UnicastRemoteObject, set its ref. |
|
467 |
if (obj instanceof UnicastRemoteObject) { |
|
468 |
((UnicastRemoteObject) obj).ref = sref; |
|
469 |
} |
|
470 |
return sref.exportObject(obj, null, false); |
|
471 |
} |
|
472 |
} |