ABSTRACT
The proxy abstraction has a longlasting tradition in object settings. From design pattern to inherent language support, from remote method invocations to simple forms of behavioral reflection - incarnations as well as applications of proxies are innumerable.Since version 1.3, Java supports the concept of dynamic proxy. Such an object conforms to a set of types specified by the program and can be used wherever an expression of any of these types is expected, yet reifies invocations performed on it. Dynamic proxies have been applied to implement paradigms as diverse as behavioral reflection, structural conformance, or multi-methods. Alas, these proxies are only available "for interfaces". The case of creating dynamic proxies for a set of types including a class type has not been considered, meaning that it is currently not possible to create a dynamic proxy mimicking an instance of a given class. This weakness strongly limits any application of dynamic proxies.In this paper we unfold the current support for dynamic proxies in Java, assessing it in the light of a set of generic criteria for proxy implementations. We present an approach to supporting dynamic proxies "for classes" in Java, consisting in transformations performed on classes at load-time, including a generic scheme for enforcing encapsulation upon field accesses. These transformations seemlessly extend the scope of the current support for dynamic proxies. We discuss the precise benefits and costs of our extension in terms of the criteria introduced, and illustrate the usefulness of uniformly available proxies by implementing future method invocations both safely and transparently.
- O. Agesen, S. N. Freund, and J. C. Mitchell. Adding Type Parameterization to the Java Language. In Proceedings of the 12th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '97), pages 49--65, October 1997.]] Google Scholar
Digital Library
- B. Alpern, A. Cocchi, S. Fink, and D. Grove. Efficient Implementation of Java Interfaces: Invokeinterface Considered Harmless. In Proceedings of the 16th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2001), pages 108--124, October 2001.]] Google Scholar
Digital Library
- D. Bacon. Kava: A Java Dialect with a Uniform Object Model for Lightweight Classes. In Proceedings of the Joint ACM Java Grande - ISCOPE 2002 Conference, pages 68--77, June 2001.]] Google Scholar
Digital Library
- D. Caromel, W. Klauser, and J. Vayssiè re.Towards Seamless Computing and Metacomputing in Java .Concurrency: Prac-tice and Experience, 10(11--13):1043--1061, September 1998.]]Google Scholar
- D. Caromel and J. Vayssière. Reflections on MOPs, Components, and Java Security. In Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP 2001), pages 256--274, June 2001.]] Google Scholar
Digital Library
- S. Chiba. Loadtime Structural Reflection in Java. In Proceedings of the 14th European Conference on Object-Oriented Programming (ECOOP 2000), pages 313--336, June 2000.]] Google Scholar
Digital Library
- A. Eliasson. Implement Design by Contract for Java using Dynamic Proxies. http://www.javaworld.com/javaworld/jw-02-2002/jw-0215-dbcproxy.html, February 2002.]]Google Scholar
- P. Th. Eugster and S. Baehni. Object-Oriented Programming in Peer-to-Peer Systems. Concurrency and Computation: Practice and Experience , 17(7-8):1053--1078, June 2005.]] Google Scholar
Digital Library
- E. Gamma, R. Helm, R. Johnson, and J. Vlissides. Design Patterns, Elements of Reusable Object-Oriented Software. Addison-Wesley, 1995.]] Google Scholar
Digital Library
- M. Golm and J. Kleinöder. Jumping to the Meta Level: Behavioral Reflection Can Be Fast and Flexible. In Proceedings of the 2nd ACM International Conference on Metalevel Architectures and Reflection (Reflection '99), 1999.]] Google Scholar
Digital Library
- L. Gong. Inside Java 2 Platform Security: Architecture, API, Design and Implementation. Addison-Wesley, 1999.]] Google Scholar
Digital Library
- M. Herlihy and J. Wing. Linearizability: a correctness condition for concurrent objects. ACM Transactions on Programming Languages and Systems, 12(3):463--492, July 1990.]] Google Scholar
Digital Library
- JBoss.JBoss 3.0. http://www.jboss.org, 2003.]]Google Scholar
- Kalixia. jAdvise. http://www.kalixia.com/weblogs/space/jAdvise, 2003.]]Google Scholar
- R. Keller and U. Hölzle. Binary Component Adaptation. In Proceedings of the 12th European Conference on Object-Oriented Programming (ECOOP '98), pages 307--329, July 1998.]] Google Scholar
Digital Library
- G. Kiczales, J. des Rivières, and D. G. Bobrow. The Art of the Metaobject Protocol. MIT Press, 1991.]] Google Scholar
Digital Library
- G. Kiczales, J. Lamping, A. Menhdhekar, Ch. Maeda, C. Lopes, J.-M. Loingtier, and J. Irwin. Aspect-Oriented Programming. In Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP '97), pages 220--242, June 1997.]]Google Scholar
Cross Ref
- J. Kienzle and R. Guerraoui. AOP: Does It Make Sense? The Case of Concurrency and Failures. In Proceedings of the 16th European Conference on Object-Oriented Programming (ECOOP 2002), pages 37--61, June 2002.]] Google Scholar
Digital Library
- H. Liebermann. Using Prototypical Objects to Implement Shared Behavior in Object-Oriented Systems. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA '86), pages 214--223, September 1986.]] Google Scholar
Digital Library
- T. Lindholm and F. Yellin. The Java Virtual Machine Specification. Addison-Wesley, 2nd edition, 1999.]] Google Scholar
Digital Library
- B. Meyer. Applying Design by Contract. IEEE Computer, 25(10):40--51, October 1992.]] Google Scholar
Digital Library
- P. Pratikakis, J. Spacco, and M. Hicks. Transparent Proxies for Java Futures. In Proceedings of the 19th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2004), pages 206--223, October 2004.]] Google Scholar
Digital Library
- F. Rivard. Smalltalk: A Reflective Language. In Proceedings of the 1st International Conference on Metalevel Architectures and Reflection (Reflection '96), pages 21--38, April 1996.]]Google Scholar
- M. Shapiro. Structure and Encapsulation in Distributed Systems: The Proxy Principle. In Proceedings of the 6th IEEE International Conference on Distributed Computing Systems (ICDCS '86), pages 198--204, May 1986.]]Google Scholar
- Sun. Dynamic Proxy Classes, 1999.]]Google Scholar
- Sun. Java Core Reflection API and Specification, 1999.]]Google Scholar
- Sun. The Java Platform 1.5 API Specification, 2004.]]Google Scholar
- M. Tatsubori, T. Sasaki, S. Chiba, and K. Itano. A Bytecode Translator for Distributed Execution of "Legacy" Java Software. In Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP 2001), pages 236--244, June 2001.]] Google Scholar
Digital Library
- T. Thai and H. Lam. .NET Framework Essentials. O'Reilly and Associates, Inc., June 2001.]] Google Scholar
Digital Library
- A. Welc, S. Jagannathan, and A. L. Hosking. Transactional Monitors for Concurrent Objects. In Proceedings of the 18th European Conference on Object-Oriented Programming (ECOOP 2004), pages 519--542, June 2004.]]Google Scholar
Cross Ref
- A. Welc, S. Jagannathan, and A. L. Hosking. Safe Futures for Java. In Proceedings of the 20th ACM Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA 2005), pages 439--453, October 2005.]] Google Scholar
Digital Library
- I. Welch and R. Stroud. From Dalang to Kava: the Evolution of a Reflective Java Extension. In Proceedings of the 2nd ACM International Conference on Metalevel Architectures and Reflection (Reflection '99), pages 2--21, 1999.]] Google Scholar
Digital Library
- I. Welch and R. J. Stroud. Kava-Using Byte Code Rewriting to Add Behavioural Reflection to Java. In Proceedings of the 6th Usenix Conference on Object-Oriented Technologies and Systems (COOTS'01), pages 119--130, January 2001.]] Google Scholar
Digital Library
- A. Yonezawa, E. Shibayama, T. Takada, and Y. Honda. Object-Oriented Concurrent Programming, chapter 4: Modeling and Programming in an Object-Oriented Concurrent Language ABCL/1, pages 55--89. MIT Press, 1987.]] Google Scholar
Digital Library
Index Terms
Uniform proxies for Java
Recommendations
Uniform proxies for Java
Proceedings of the 2006 OOPSLA ConferenceThe proxy abstraction has a longlasting tradition in object settings. From design pattern to inherent language support, from remote method invocations to simple forms of behavioral reflection - incarnations as well as applications of proxies are ...
Transparent proxies for java futures
OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsA <i>proxy</i> object is a surrogate or placeholder that controls access to another target object. Proxies can be used to support distributed programming, lazy or parallel evaluation, access control, and other simple forms of behavioral reflection. ...
Transparent proxies for java futures
OOPSLA '04A <i>proxy</i> object is a surrogate or placeholder that controls access to another target object. Proxies can be used to support distributed programming, lazy or parallel evaluation, access control, and other simple forms of behavioral reflection. ...







Comments