Class ProxyIndirectionHandler

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.reflect.InvocationHandler

    public class ProxyIndirectionHandler
    extends java.lang.Object
    implements java.lang.reflect.InvocationHandler, java.io.Serializable

    ProxyIndirectionHandler

    Transparently handles EclipseLink indirection for 1:1 relationships through use of the Java Proxy framework in JDK 1.3. This class intercepts messages sent to the proxy object, and instantiates its internal ValueHolder when necessary.
    Since:
    TopLink 3.0
    Author:
    Rick Barkhouse
    See Also:
    ProxyIndirectionPolicy, Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyIndirectionHandler()
      INTERNAL: Just in here to allow for Serialization.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ValueHolderInterface getValueHolder()
      INTERNAL: Get the ValueHolder associated with this handler.
      java.lang.Object invoke​(java.lang.Object proxy, java.lang.reflect.Method m, java.lang.Object[] args)
      INTERNAL: Handle the method calls on the proxy object.
      static java.lang.Object newProxyInstance​(java.lang.Class anInterface, java.lang.Class[] interfaces, ValueHolderInterface valueHolder)
      INTERNAL: Utility method to create a new proxy object.
      void setValueHolder​(ValueHolderInterface value)
      INTERNAL: Set the ValueHolder associated with this handler.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProxyIndirectionHandler

        public ProxyIndirectionHandler()
        INTERNAL: Just in here to allow for Serialization.
    • Method Detail

      • invoke

        public java.lang.Object invoke​(java.lang.Object proxy,
                                       java.lang.reflect.Method m,
                                       java.lang.Object[] args)
                                throws java.lang.Throwable
        INTERNAL: Handle the method calls on the proxy object.
        Specified by:
        invoke in interface java.lang.reflect.InvocationHandler
        Throws:
        java.lang.Throwable
      • newProxyInstance

        public static java.lang.Object newProxyInstance​(java.lang.Class anInterface,
                                                        java.lang.Class[] interfaces,
                                                        ValueHolderInterface valueHolder)
        INTERNAL: Utility method to create a new proxy object.
      • getValueHolder

        public ValueHolderInterface getValueHolder()
        INTERNAL: Get the ValueHolder associated with this handler.
      • setValueHolder

        public void setValueHolder​(ValueHolderInterface value)
        INTERNAL: Set the ValueHolder associated with this handler.