Save This Page
Home » spring-framework-2.5.6-with-dependencies » org.springframework » aop » framework » [javadoc | source]
org.springframework.aop.framework
final class: JdkDynamicAopProxy [javadoc | source]
java.lang.Object
   org.springframework.aop.framework.JdkDynamicAopProxy

All Implemented Interfaces:
    AopProxy, Serializable, InvocationHandler

JDK-based AopProxy implementation for the Spring AOP framework, based on JDK dynamic proxies .

Creates a dynamic proxy, implementing the interfaces exposed by the AopProxy. Dynamic proxies cannot be used to proxy methods defined in classes, rather than interfaces.

Objects of this type should be obtained through proxy factories, configured by an AdvisedSupport class. This class is internal to Spring's AOP framework and need not be used directly by client code.

Proxies created using this class will be thread-safe if the underlying (target) class is thread-safe.

Proxies are serializable so long as all Advisors (including Advices and Pointcuts) and the TargetSource are serializable.

Constructor:
 public JdkDynamicAopProxy(AdvisedSupport config) throws AopConfigException 
    Construct a new JdkDynamicAopProxy for the given AOP configuration.
    Parameters:
    config - the AOP configuration as AdvisedSupport object
    Throws:
    AopConfigException - if the config is invalid. We try to throw an informative exception in this case, rather than let a mysterious failure happen later.
Method from org.springframework.aop.framework.JdkDynamicAopProxy Summary:
equals,   getProxy,   getProxy,   hashCode,   invoke
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.framework.JdkDynamicAopProxy Detail:
 public boolean equals(Object other) 
    Equality means interfaces, advisors and TargetSource are equal.

    The compared object may be a JdkDynamicAopProxy instance itself or a dynamic proxy wrapping a JdkDynamicAopProxy instance.

 public Object getProxy() 
 public Object getProxy(ClassLoader classLoader) 
 public int hashCode() 
    Proxy uses the hash code of the TargetSource.
 public Object invoke(Object proxy,
    Method method,
    Object[] args) throws Throwable 
    Implementation of InvocationHandler.invoke.

    Callers will see exactly the exception thrown by the target, unless a hook method throws an exception.