ColdSpring 2.0 - Narwhal

coldspring.aop.framework.autoproxy
Class AbstractAdvisorAutoProxyCreator

WEB-INF.cftags.component
        extended by coldspring.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator
All Implemented Interfaces:
BeanFactoryAware , InstantiationAwareBeanPostProcessor
Direct Known Subclasses:
DefaultAdvisorAutoProxyCreator

public class AbstractAdvisorAutoProxyCreator
extends WEB-INF.cftags.component

Generic auto proxy creator that builds AOP proxies for specific beans based on detected Advisors for each bean.
Subclasses must implement the abstract findEligableAdvisors() method to return a list of Advisors applying to any object


Constructor Summary
init()
          Constructor
 
Method Summary
 boolean checkClassMatchAdvisors(Class class)
          Check to see if this class is an AOP candidate, against the given set of Advisors
 any checkIsAOPCandidate(Class class)
          Check to see if this bean is an AOP candidate, against the given set of Advisors
private array<Advisor> findCandidateAdvisors()
          Returns all Advisors in the BeanFactory
private array<Advisor> findEligableAdvisors()
          Abstract: overwrite me to determine which Advisors are candidates for auto proxying
private array<Advisor> getAdvisors()
private BeanFactory getBeanFactory()
private struct<string,string> getCreateProxyCache()
private struct getEarlyProxyCache()
private ProxyFactory getProxyFactory()
private ReflectionService getReflectionService()
private struct getWrapInstantiatedProxyCache()
 void initProxyFactory()
          initialises the proxy factory with all it's required advisors
 any postProcessAfterInitialization(any bean, string beanName)
          Returns the current bean
 boolean postProcessAfterInstantiation(any bean, string beanName)
          Always returns true
 any postProcessBeforeInitialization(any bean, string beanName)
          Returns the current bean
 any postProcessBeforeInstantiation(any class, string beanName)
          Generates the AOP proxy for the given bean, if any Advisors match this bean
private void setAdvisors(array<Advisor> advisors)
 void setBeanFactory(BeanFactory beanFactory)
          Callback that supplies the owning factory to a bean instance
private void setCreateProxyCache(struct<string,string> createProxyCache)
private void setEarlyProxyCache(struct earlyProxyCache)
private void setProxyFactory(ProxyFactory proxyFactory)
private void setReflectionService(ReflectionService reflectionService)
private void setWrapInstantiatedProxyCache(struct wrapInstantiatedProxyCache)
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init()
Constructor

Method Detail

checkClassMatchAdvisors

public boolean checkClassMatchAdvisors(Class class)
Check to see if this class is an AOP candidate, against the given set of Advisors

Parameters:
class - the class to check

checkIsAOPCandidate

public any checkIsAOPCandidate(Class class)
Check to see if this bean is an AOP candidate, against the given set of Advisors

Parameters:
class - the class of the bean

findCandidateAdvisors

private array<Advisor> findCandidateAdvisors()
Returns all Advisors in the BeanFactory.


findEligableAdvisors

private array<Advisor> findEligableAdvisors()
Abstract: overwrite me to determine which Advisors are candidates for auto proxying


getAdvisors

private array<Advisor> getAdvisors()


getBeanFactory

private BeanFactory getBeanFactory()


getCreateProxyCache

private struct<string,string> getCreateProxyCache()


getEarlyProxyCache

private struct getEarlyProxyCache()


getProxyFactory

private ProxyFactory getProxyFactory()


getReflectionService

private ReflectionService getReflectionService()


getWrapInstantiatedProxyCache

private struct getWrapInstantiatedProxyCache()


initProxyFactory

public void initProxyFactory()
initialises the proxy factory with all it's required advisors


postProcessAfterInitialization

public any postProcessAfterInitialization(any bean, string beanName)
Returns the current bean

Specified by:
postProcessAfterInitialization in interface BeanPostProcessor
Parameters:
bean - the new bean instance
beanName - the name of the bean

postProcessAfterInstantiation

public boolean postProcessAfterInstantiation(any bean, string beanName)
Always returns true

Specified by:
postProcessAfterInstantiation in interface InstantiationAwareBeanPostProcessor
Parameters:
bean - the bean instance created, with properties not having been set yet
beanName - the name of the bean

postProcessBeforeInitialization

public any postProcessBeforeInitialization(any bean, string beanName)
Returns the current bean

Specified by:
postProcessBeforeInitialization in interface BeanPostProcessor
Parameters:
bean - the new bean instance
beanName - the name of the bean

postProcessBeforeInstantiation

public any postProcessBeforeInstantiation(any class, string beanName)
Generates the AOP proxy for the given bean, if any Advisors match this bean

Specified by:
postProcessBeforeInstantiation in interface InstantiationAwareBeanPostProcessor
Parameters:
class - The class and/or meta data information of the bean about to be instantiated. For CFCs this will be the results of getMetaData(), for Java objects it will be an instance of java.lang.Class
beanName - the name of the bean

setAdvisors

private void setAdvisors(array<Advisor> advisors)

Parameters:
advisors

setBeanFactory

public void setBeanFactory(BeanFactory beanFactory)
Callback that supplies the owning factory to a bean instance. Invoked after the population of normal bean properties but before an initialization callback such as a custom init-method.

Specified by:
setBeanFactory in interface BeanFactoryAware
Parameters:
beanFactory

setCreateProxyCache

private void setCreateProxyCache(struct<string,string> createProxyCache)

Parameters:
createProxyCache

setEarlyProxyCache

private void setEarlyProxyCache(struct earlyProxyCache)

Parameters:
earlyProxyCache

setProxyFactory

private void setProxyFactory(ProxyFactory proxyFactory)

Parameters:
proxyFactory

setReflectionService

private void setReflectionService(ReflectionService reflectionService)

Parameters:
reflectionService

setWrapInstantiatedProxyCache

private void setWrapInstantiatedProxyCache(struct wrapInstantiatedProxyCache)

Parameters:
wrapInstantiatedProxyCache

ColdSpring 2.0 - Narwhal