org.springframework.cache.interceptor
Class CacheProxyFactoryBean

java.lang.Object
  extended by org.springframework.aop.framework.ProxyConfig
      extended by org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
          extended by org.springframework.cache.interceptor.CacheProxyFactoryBean
All Implemented Interfaces:
Serializable, Aware, BeanClassLoaderAware, FactoryBean<Object>, InitializingBean

public class CacheProxyFactoryBean
extends AbstractSingletonProxyFactoryBean

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.

Author:
Costin Leau
See Also:
ProxyFactoryBean, CachingInterceptor, Serialized Form

Constructor Summary
CacheProxyFactoryBean()
           
 
Method Summary
protected  Object createMainInterceptor()
          Create the "main" interceptor for this proxy factory bean.
 void setCacheDefinitionSources(CacheDefinitionSource... cacheDefinitionSources)
          Set the caching attribute source which is used to find the cache operation definition.
 
Methods inherited from class org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
afterPropertiesSet, createTargetSource, getObject, getObjectType, isSingleton, setAdvisorAdapterRegistry, setBeanClassLoader, setPostInterceptors, setPreInterceptors, setProxyClassLoader, setProxyInterfaces, setTarget
 
Methods inherited from class org.springframework.aop.framework.ProxyConfig
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheProxyFactoryBean

public CacheProxyFactoryBean()
Method Detail

createMainInterceptor

protected Object createMainInterceptor()
Description copied from class: AbstractSingletonProxyFactoryBean
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.

Specified by:
createMainInterceptor in class AbstractSingletonProxyFactoryBean

setCacheDefinitionSources

public void setCacheDefinitionSources(CacheDefinitionSource... cacheDefinitionSources)
Set the caching attribute source which is used to find the cache operation definition.

Parameters:
cacheDefinitionSources - cache definition sources