C# 클래스 Spring.Aop.Framework.AutoProxy.AbstractAdvisorAutoProxyCreator

Abstract IObjectPostProcessor implementation that creates AOP proxies. This class is completely generic; it contains no special code to handle any particular aspects, such as pooling aspects.

Subclasses must implement the abstract FindCandidateAdvisors() method to return a list of Advisors applying to any object. Subclasses can also override the inherited ShouldSkip() method to exclude certain objects from autoproxying, but they must be careful to invoke the ShouldSkip() method of this class, which tries to avoid circular reference problems and infinite loops.

Advisors or advices requiring ordering should implement the Ordered interface. This class sorts advisors by Ordered order value. Advisors that don't implement the Ordered interface will be considered to be unordered, and will appear at the end of the advisor chain in undefined order.

상속: Spring.Aop.Framework.AutoProxy.AbstractAutoProxyCreator
파일 보기 프로젝트 열기: spring-projects/spring-net 1 사용 예제들

보호된 메소드들

메소드 설명
AbstractAdvisorAutoProxyCreator ( ) : System

Initialize

CreateAdvisorRetrievalHelper ( IConfigurableListableObjectFactory objectFactory ) : IAdvisorRetrievalHelper

Create the IAdvisorRetrievalHelper for retrieving the list of applicable advisor objects. The default implementation calls back into IsEligibleAdvisorObject thus it usually is sufficient to just override IsEligibleAdvisorObject. Override CreateAdvisorRetrievalHelper only if you know what you are doing!

ExtendAdvisors ( IList advisors, Type objectType, string objectName ) : void

Extension hook that subclasses can override to add additional advisors for the given object, given the sorted advisors obtained to date.
The default implementation does nothing.
Typically used to add advisors that expose contextual information required by some of the later advisors.

The advisor list passed into this method is already reduced to advisors applying to this particular object. If you want to register additional common advisor candidates, override FindCandidateAdvisors.

FindAdvisorsThatCanApply ( IList candidateAdvisors, Type targetType, string targetName ) : IList

From the given list of candidate advisors, select the ones that are applicable to the given target specified by targetType and name.

FindCandidateAdvisors ( Type targetType, string targetName ) : IList

Find all possible advisor candidates to use in auto-proxying

FindEligibleAdvisors ( Type targetType, string targetName ) : IList

Find all eligible advices and for autoproxying this class.

GetAdvicesAndAdvisorsForObject ( Type targetType, string targetName, ITargetSource customTargetSource ) : IList

Return whether the given object is to be proxied, what additional advices (e.g. AOP Alliance interceptors) and advisors to apply.

The previous targetName of this method was "GetInterceptorAndAdvisorForObject". It has been renamed in the course of general terminology clarification in Spring 1.1. An AOP Alliance Interceptor is just a special form of Advice, so the generic Advice term is preferred now.

The third parameter, customTargetSource, is new in Spring 1.1; add it to existing implementations of this method.

InitObjectFactory ( IConfigurableListableObjectFactory objectFactory ) : void

An new IConfigurableListableObjectFactory was set. Initialize this creator instance according to the specified object factory.

IsEligibleAdvisorObject ( string advisorName, Type targetType, string targetName ) : bool

Whether the given advisor is eligible for the specified target. The default implementation always returns true.

SortAdvisors ( IList advisors ) : IList

Sorts the advisors.

메소드 상세

AbstractAdvisorAutoProxyCreator() 보호된 메소드

Initialize
protected AbstractAdvisorAutoProxyCreator ( ) : System
리턴 System

CreateAdvisorRetrievalHelper() 보호된 메소드

Create the IAdvisorRetrievalHelper for retrieving the list of applicable advisor objects. The default implementation calls back into IsEligibleAdvisorObject thus it usually is sufficient to just override IsEligibleAdvisorObject. Override CreateAdvisorRetrievalHelper only if you know what you are doing!
protected CreateAdvisorRetrievalHelper ( IConfigurableListableObjectFactory objectFactory ) : IAdvisorRetrievalHelper
objectFactory IConfigurableListableObjectFactory
리턴 IAdvisorRetrievalHelper

ExtendAdvisors() 보호된 메소드

Extension hook that subclasses can override to add additional advisors for the given object, given the sorted advisors obtained to date.
The default implementation does nothing.
Typically used to add advisors that expose contextual information required by some of the later advisors.
The advisor list passed into this method is already reduced to advisors applying to this particular object. If you want to register additional common advisor candidates, override FindCandidateAdvisors.
protected ExtendAdvisors ( IList advisors, Type objectType, string objectName ) : void
advisors IList Advisors that have already been identified as applying to a given object
objectType System.Type the type of the object to be advised
objectName string the name of the object to be advised
리턴 void

FindAdvisorsThatCanApply() 보호된 메소드

From the given list of candidate advisors, select the ones that are applicable to the given target specified by targetType and name.
protected FindAdvisorsThatCanApply ( IList candidateAdvisors, Type targetType, string targetName ) : IList
candidateAdvisors IList the list of candidate advisors to date
targetType System.Type the target object's type
targetName string the target object's name
리턴 IList

FindCandidateAdvisors() 보호된 메소드

Find all possible advisor candidates to use in auto-proxying
protected FindCandidateAdvisors ( Type targetType, string targetName ) : IList
targetType System.Type the type of the object to be advised
targetName string the name of the object to be advised
리턴 IList

FindEligibleAdvisors() 보호된 메소드

Find all eligible advices and for autoproxying this class.
protected FindEligibleAdvisors ( Type targetType, string targetName ) : IList
targetType System.Type the type of the object to be advised
targetName string the name of the object to be advised
리턴 IList

GetAdvicesAndAdvisorsForObject() 보호된 메소드

Return whether the given object is to be proxied, what additional advices (e.g. AOP Alliance interceptors) and advisors to apply.

The previous targetName of this method was "GetInterceptorAndAdvisorForObject". It has been renamed in the course of general terminology clarification in Spring 1.1. An AOP Alliance Interceptor is just a special form of Advice, so the generic Advice term is preferred now.

The third parameter, customTargetSource, is new in Spring 1.1; add it to existing implementations of this method.

protected GetAdvicesAndAdvisorsForObject ( Type targetType, string targetName, ITargetSource customTargetSource ) : IList
targetType System.Type the type of the target object
targetName string the name of the target object
customTargetSource ITargetSource targetSource returned by TargetSource property: /// may be ignored. Will be null unless a custom target source is in use.
리턴 IList

InitObjectFactory() 보호된 메소드

An new IConfigurableListableObjectFactory was set. Initialize this creator instance according to the specified object factory.
protected InitObjectFactory ( IConfigurableListableObjectFactory objectFactory ) : void
objectFactory IConfigurableListableObjectFactory
리턴 void

IsEligibleAdvisorObject() 보호된 메소드

Whether the given advisor is eligible for the specified target. The default implementation always returns true.
protected IsEligibleAdvisorObject ( string advisorName, Type targetType, string targetName ) : bool
advisorName string the advisor name
targetType System.Type the target object's type
targetName string the target object's name
리턴 bool

SortAdvisors() 보호된 메소드

Sorts the advisors.
protected SortAdvisors ( IList advisors ) : IList
advisors IList The advisors.
리턴 IList