Claims
- 1. A method for executing a remote method, the method comprising:
wrapping each argument of a remote method when each argument is a remote object; copying each argument of the remote method when the each argument is not a remote object; invoking the remote method using each wrapped or copied argument; wrapping a result of the invoked remote method when the result is a remote object; and copying the result of the remote method when the result is not a remote object.
- 2. A method as recited in claim 1, wherein the argument or result is a remote object when its declared class implements a remote marker interface
- 3. A method as recited in claim 1, wherein the result is only wrapped or copied when an invocation thread associated with invoking the remote method is not being terminated, the method further comprising throwing an exception on the remote method when the invocation thread is terminated.
- 4. A method as recited in claim 3, wherein wrapping each argument and result includes:
creating a wrapper object for the argument or the result and remembering an association between the wrapper object and the argument or the result when a wrapper object has not already been created; and finding the wrapper object for the argument or the result based on a previous association between the argument or the result and the wrapper object when the wrapper object has already been created.
- 5. A method as recited in claim 4, wherein creating the wrapper object for each argument and the result includes:
finding or generating a remote stub class; creating an instantiation of the remote stub class; and setting a data member within the remote stub class to refer to the argument or the result.
- 6. A method as recited in claim 5, wherein generating the remote stub class includes:
generating a class name; adding a method implementation for each method of a class of the argument or result being wrapped into a class definition array; and remembering an association between the class and the remote stub class.
- 7. A method as recited in claim 6, wherein finding the remote stub class is based on a previously remembered association between a class and the remote stub class.
- 8. A method as recited in claim 1, wherein copying each argument and the result includes:
serializing each argument or the result into a byte array when the each argument or the result implements serialization; deserializing the each argument or the result with respect to a target class loader associated with code that will use the copy of each argument or the result when the each argument or the result implements serialization; implementing a failure process when the each argument or the result does not implement serialization
- 9. A computer readable medium containing computer codes for executing a remote method, the computer readable medium comprising:
computer code for wrapping each argument of a remote method when the argument is a remote object; computer code for copying each argument of the remote method when the each argument is not a remote object; computer code for invoking the remote method using the wrapped or copied argument(s); computer code for wrapping a result of the remote method when the result is a remote object; and computer code for copying the result of the remote method when the result is note a remote object.
- 10. A computer readable medium as recited in claim 9, wherein the argument or the result is a remote object when its declared class implements a remote marker interface.
- 11. A computer readable medium as recited in claim 9, wherein the result is only wrapped or copied when an invocation thread associated with invoking the remote method is not being terminated, the computer readable medium further comprising computer code for throwing an exception on the remote method when the invocation thread is terminated.
- 12. A computer readable medium as recited in claim 8, wherein wrapping the argument or the result includes:
creating a wrapper object for the argument or the result and remembering an association between the wrapper object and the argument or the result when a wrapper object has not already been created; and finding the wrapper object for the argument or the result based on a previous association between the argument or the result and the wrapper object when the wrapper object has already been created.
- 13. A computer readable medium as recited in claim 12, wherein creating the wrapper object for the argument or the result includes:
finding or generating a remote stub class; creating an instantiation of the remote stub class; and setting a data member within the remote stub class to refer to the argument or the result.
- 14. A computer readable medium as recited in claim 13, wherein generating the remote stub class includes:
generating a class name; adding a method implementation for each method of a class of the argument or result being wrapped into a class definition array; and remember an association between the class and the remote stub class.
- 15. A computer readable medium as recited in claim 14, wherein finding the remote stub class is based on a previously remembered association between a class and the remote stub class.
- 16. A computer readable medium as recited in claim 9, wherein copying each of the argument or the result includes:
serializing each argument or the result into a byte array when the each argument or the result implements serialization; deserializing each argument or the result with respect to a target class loader associated with code that is using the copy of each argument or the result when the each argument or the result implements serialization; implementing a failure process when the each argument or the result does not implement serialization
CROSS REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority to U.S. Provisional Application No. 60/168,221 entitled APPARATUS AND METHODS FOR COMMUNICATING BETWEEN RESOUCE DOMAINS filed Nov. 30, 1999 by Foote et al. This application is related to co-pending U.S. patent application Ser. No. 09/394,118 (Attorney Docket SUN1P250) entitled, “APPARATUS AND METHODS FOR MANAGING RESOURCE USAGE” filed Sep. 10, 1999 by William F. Foote and U.S. patent application Ser. No. 09/394,121 (Attorney Docket SUN1P219) entitled, “APPARATUS AND METHODS FOR PREVENTING DENIAL OF SERVICE ATTACKS” filed Sep. 10, 1999 by William F. Foote. These applications are incorporated herein by reference in their entirety for all purposes.
Provisional Applications (1)
|
Number |
Date |
Country |
|
60168221 |
Nov 1999 |
US |