com.interface21.aop.framework
Class AopProxy
java.lang.Object
|
+--com.interface21.aop.framework.AopProxy
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler
- public class AopProxy
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler
InvocationHandler implementation for the Spring AOP
framework, based on Java 1.3+ dynamic proxies.
Objects of this type should be obtained through
proxy factories, configured by a ProxyConfig implementation.
This class is internal to the Spring framework and need not
be used directly by client code.
Proxies created using this class can be threadsafe if the
underlying (target) class is threadsafe.
- Version:
- $Id: AopProxy.java,v 1.5 2003/06/18 19:09:48 johnsonr Exp $
- Author:
- Rod Johnson
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
|
Method Summary |
boolean |
equals(java.lang.Object other)
Equality means interceptors and interfaces are == |
static java.lang.Object |
getProxy(AopProxy aop)
|
static java.lang.Object |
getProxy(java.lang.ClassLoader cl,
AopProxy aop)
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Implementation of InvocationHandler.invoke.
|
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
AopProxy
public AopProxy(ProxyConfig config)
throws AopConfigException
- 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.
getProxy
public static java.lang.Object getProxy(AopProxy aop)
- Returns:
- a new Proxy object for the given object proxying
the given interface
getProxy
public static java.lang.Object getProxy(java.lang.ClassLoader cl,
AopProxy aop)
- Returns:
- a new Proxy object for the given object proxying
the given interface
invoke
public final java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- Implementation of InvocationHandler.invoke.
Callers will see exactly the exception thrown by the target, unless a hook
method throws an exception.
- Specified by:
invoke in interface java.lang.reflect.InvocationHandler
equals
public boolean equals(java.lang.Object other)
- Equality means interceptors and interfaces are ==
- Overrides:
equals in class java.lang.Object
- Parameters:
other - may be a dynamic proxy wrapping an instance
of this class- See Also:
Object.equals(java.lang.Object)
Rod Johnson and Spring contributors 2001-2003.