Class Overview
Proxy factory bean for simplified declarative caching handling.
This is a convenient alternative to a standard AOP
ProxyFactoryBean
with a separate CachingInterceptor definition.
This class is intended to cover the typical case of declarative
transaction demarcation: namely, wrapping a singleton target object with a
caching proxy, proxying all the interfaces that the target implements.
Summary
[Expand]
Inherited Methods |
From class
org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
void
|
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
abstract
Object
|
createMainInterceptor()
Create the "main" interceptor for this proxy factory bean.
|
TargetSource
|
createTargetSource(Object target)
Determine a TargetSource for the given target (or TargetSource).
|
Object
|
getObject()
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
Class<?>
|
getObjectType()
Return the type of object that this FactoryBean creates,
or null if not known in advance.
|
final
boolean
|
isSingleton()
Is the object managed by this factory a singleton? That is,
will getObject() always return the same object
(a reference that can be cached)?
NOTE: If a FactoryBean indicates to hold a singleton object,
the object returned from getObject() might get cached
by the owning BeanFactory.
|
void
|
setAdvisorAdapterRegistry(AdvisorAdapterRegistry advisorAdapterRegistry)
Specify the AdvisorAdapterRegistry to use.
|
void
|
setBeanClassLoader(ClassLoader classLoader)
Callback that supplies the bean class loader to
a bean instance.
|
void
|
setPostInterceptors(Object[] postInterceptors)
Set additional interceptors (or advisors) to be applied after the
implicit transaction interceptor.
|
void
|
setPreInterceptors(Object[] preInterceptors)
Set additional interceptors (or advisors) to be applied before the
implicit transaction interceptor, e.g.
|
void
|
setProxyClassLoader(ClassLoader classLoader)
Set the ClassLoader to generate the proxy class in.
|
void
|
setProxyInterfaces(Class[] proxyInterfaces)
Specify the set of interfaces being proxied.
|
void
|
setTarget(Object target)
Set the target object, that is, the bean to be wrapped with a transactional proxy.
|
|
From class
org.springframework.aop.framework.ProxyConfig
void
|
copyFrom(ProxyConfig other)
Copy configuration from the other config object.
|
boolean
|
isExposeProxy()
Return whether the AOP proxy will expose the AOP proxy for
each invocation.
|
boolean
|
isFrozen()
Return whether the config is frozen, and no advice changes can be made.
|
boolean
|
isOpaque()
Return whether proxies created by this configuration should be
prevented from being cast to Advised .
|
boolean
|
isOptimize()
Return whether proxies should perform aggressive optimizations.
|
boolean
|
isProxyTargetClass()
Return whether to proxy the target class directly as well as any interfaces.
|
void
|
setExposeProxy(boolean exposeProxy)
Set whether the proxy should be exposed by the AOP framework as a
ThreadLocal for retrieval via the AopContext class.
|
void
|
setFrozen(boolean frozen)
Set whether this config should be frozen.
|
void
|
setOpaque(boolean opaque)
Set whether proxies created by this configuration should be prevented
from being cast to Advised to query proxy status.
|
void
|
setOptimize(boolean optimize)
Set whether proxies should perform aggressive optimizations.
|
void
|
setProxyTargetClass(boolean proxyTargetClass)
Set whether to proxy the target class directly, instead of just proxying
specific interfaces.
|
String
|
toString()
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
|
From interface
org.springframework.beans.factory.BeanClassLoaderAware
|
From interface
org.springframework.beans.factory.FactoryBean
abstract
T
|
getObject()
Return an instance (possibly shared or independent) of the object
managed by this factory.
|
abstract
Class<?>
|
getObjectType()
Return the type of object that this FactoryBean creates,
or null if not known in advance.
|
abstract
boolean
|
isSingleton()
Is the object managed by this factory a singleton? That is,
will getObject() always return the same object
(a reference that can be cached)?
NOTE: If a FactoryBean indicates to hold a singleton object,
the object returned from getObject() might get cached
by the owning BeanFactory.
|
|
From interface
org.springframework.beans.factory.InitializingBean
abstract
void
|
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
|
|
Public Constructors
public
CacheProxyFactoryBean
()
Public Methods
public
void
setCacheDefinitionSources
(CacheDefinitionSource... cacheDefinitionSources)
Set the caching attribute source which is used to find the cache operation
definition.
Parameters
cacheDefinitionSources
| cache definition sources
|
Protected Methods
protected
Object
createMainInterceptor
()
Create the "main" interceptor for this proxy factory bean.
Typically an Advisor, but can also be any type of Advice.
Pre-interceptors will be applied before, post-interceptors
will be applied after this interceptor.