| java.lang.Object org.springframework.aop.framework.ProxyConfig org.springframework.aop.framework.AdvisedSupport org.springframework.aop.framework.ProxyCreatorSupport org.springframework.aop.framework.ProxyFactory
ProxyFactory | public class ProxyFactory extends ProxyCreatorSupport implements AopProxy(Code) | | Factory for AOP proxies for programmatic use, rather than via a bean
factory. This class provides a simple way of obtaining and configuring
AOP proxies in code.
author: Rod Johnson author: Juergen Hoeller author: Rob Harrop since: 14.03.2003 |
Constructor Summary | |
public | ProxyFactory() Create a new ProxyFactory. | public | ProxyFactory(Object target) Create a new ProxyFactory. | public | ProxyFactory(Class[] proxyInterfaces) Create a new ProxyFactory.
No target, only interfaces. | public | ProxyFactory(Class proxyInterface, Interceptor interceptor) Create a new ProxyFactory for the given interface and interceptor. | public | ProxyFactory(Class proxyInterface, TargetSource targetSource) Create a ProxyFactory for the specified TargetSource ,
making the proxy implement the specified interface. |
Method Summary | |
public Object | getProxy() Create a new proxy according to the settings in this factory.
Can be called repeatedly. | public Object | getProxy(ClassLoader classLoader) Create a new proxy according to the settings in this factory.
Can be called repeatedly. | public static Object | getProxy(Class proxyInterface, Interceptor interceptor) Create a new proxy for the given interface and interceptor. | public static Object | getProxy(Class proxyInterface, TargetSource targetSource) Create a proxy for the specified TargetSource ,
implementing the specified interface. | public static Object | getProxy(TargetSource targetSource) Create a proxy for the specified TargetSource that extends
the target class of the TargetSource . |
ProxyFactory | public ProxyFactory()(Code) | | Create a new ProxyFactory.
|
ProxyFactory | public ProxyFactory(Object target)(Code) | | Create a new ProxyFactory.
Will proxy all interfaces that the given target implements.
Parameters: target - the target object to be proxied |
ProxyFactory | public ProxyFactory(Class[] proxyInterfaces)(Code) | | Create a new ProxyFactory.
No target, only interfaces. Must add interceptors.
Parameters: proxyInterfaces - the interfaces that the proxy should implement |
ProxyFactory | public ProxyFactory(Class proxyInterface, Interceptor interceptor)(Code) | | Create a new ProxyFactory for the given interface and interceptor.
Convenience method for creating a proxy for a single interceptor,
assuming that the interceptor handles all calls itself rather than
delegating to a target, like in the case of remoting proxies.
Parameters: proxyInterface - the interface that the proxy should implement Parameters: interceptor - the interceptor that the proxy should invoke |
ProxyFactory | public ProxyFactory(Class proxyInterface, TargetSource targetSource)(Code) | | Create a ProxyFactory for the specified TargetSource ,
making the proxy implement the specified interface.
Parameters: proxyInterface - the interface that the proxy should implement Parameters: targetSource - the TargetSource that the proxy should invoke |
getProxy | public Object getProxy()(Code) | | Create a new proxy according to the settings in this factory.
Can be called repeatedly. Effect will vary if we've added
or removed interfaces. Can add and remove interceptors.
Uses a default class loader: Usually, the thread context class loader
(if necessary for proxy creation).
the proxy object |
getProxy | public Object getProxy(ClassLoader classLoader)(Code) | | Create a new proxy according to the settings in this factory.
Can be called repeatedly. Effect will vary if we've added
or removed interfaces. Can add and remove interceptors.
Uses the given class loader (if necessary for proxy creation).
Parameters: classLoader - the class loader to create the proxy with(or null for the low-level proxy facility's default) the proxy object |
getProxy | public static Object getProxy(Class proxyInterface, Interceptor interceptor)(Code) | | Create a new proxy for the given interface and interceptor.
Convenience method for creating a proxy for a single interceptor,
assuming that the interceptor handles all calls itself rather than
delegating to a target, like in the case of remoting proxies.
Parameters: proxyInterface - the interface that the proxy should implement Parameters: interceptor - the interceptor that the proxy should invoke the proxy object See Also: ProxyFactory.ProxyFactory(Class,org.aopalliance.intercept.Interceptor) |
getProxy | public static Object getProxy(TargetSource targetSource)(Code) | | Create a proxy for the specified TargetSource that extends
the target class of the TargetSource .
Parameters: targetSource - the TargetSource that the proxy should invoke the proxy object |
|
|