Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » aop » framework » [javadoc | source]
org.springframework.aop.framework
public class: AdvisedSupport [javadoc | source]
java.lang.Object
   org.springframework.aop.framework.ProxyConfig
      org.springframework.aop.framework.AdvisedSupport

All Implemented Interfaces:
    Advised, Serializable

Direct Known Subclasses:
    ProxyFactoryBean, AspectJProxyFactory, ProxyFactory, ProxyCreatorSupport

Base class for AOP proxy configuration managers. These are not themselves AOP proxies, but subclasses of this class are normally factories from which AOP proxy instances are obtained directly.

This class frees subclasses of the housekeeping of Advices and Advisors, but doesn't actually implement proxy creation methods, which are provided by subclasses.

This class is serializable; subclasses need not be. This class is used to hold snapshots of proxies.

Field Summary
public static final  TargetSource EMPTY_TARGET_SOURCE    Canonical TargetSource when there's no target, and behavior is supplied by the advisors. 
 TargetSource targetSource    Package-protected to allow direct access for efficiency 
 AdvisorChainFactory advisorChainFactory    The AdvisorChainFactory to use 
Fields inherited from org.springframework.aop.framework.ProxyConfig:
opaque,  exposeProxy
Constructor:
 public AdvisedSupport() 
 public AdvisedSupport(Class[] interfaces) 
    Create a AdvisedSupport instance with the given parameters.
    Parameters:
    interfaces - the proxied interfaces
Method from org.springframework.aop.framework.AdvisedSupport Summary:
addAdvice,   addAdvice,   addAdvisor,   addAdvisor,   addAllAdvisors,   addInterface,   adviceChanged,   adviceIncluded,   copyConfigurationFrom,   copyConfigurationFrom,   countAdvicesOfType,   getAdvisorChainFactory,   getAdvisors,   getAdvisorsInternal,   getConfigurationOnlyCopy,   getInterceptorsAndDynamicInterceptionAdvice,   getProxiedInterfaces,   getTargetClass,   getTargetSource,   indexOf,   indexOf,   isInterfaceProxied,   isPreFiltered,   removeAdvice,   removeAdvisor,   removeAdvisor,   removeInterface,   replaceAdvisor,   setAdvisorChainFactory,   setInterfaces,   setPreFiltered,   setTarget,   setTargetClass,   setTargetSource,   toProxyConfigString,   toString,   updateAdvisorArray
Methods from org.springframework.aop.framework.ProxyConfig:
copyFrom,   isExposeProxy,   isFrozen,   isOpaque,   isOptimize,   isProxyTargetClass,   setExposeProxy,   setFrozen,   setOpaque,   setOptimize,   setProxyTargetClass,   toString
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.framework.AdvisedSupport Detail:
 public  void addAdvice(Advice advice) throws AopConfigException 
 public  void addAdvice(int pos,
    Advice advice) throws AopConfigException 
    Cannot add introductions this way unless the advice implements IntroductionInfo.
 public  void addAdvisor(Advisor advisor) 
 public  void addAdvisor(int pos,
    Advisor advisor) throws AopConfigException 
 public  void addAllAdvisors(Advisor[] advisors) 
    Add all of the given advisors to this proxy configuration.
 public  void addInterface(Class intf) 
    Add a new proxied interface.
 protected  void adviceChanged() 
    Invoked when advice has changed.
 public boolean adviceIncluded(Advice advice) 
    Is the given advice included in any advisor within this proxy configuration?
 protected  void copyConfigurationFrom(AdvisedSupport other) 
    Call this method on a new instance created by the no-arg constructor to create an independent copy of the configuration from the given object.
 protected  void copyConfigurationFrom(AdvisedSupport other,
    TargetSource targetSource,
    List advisors) 
    Copy the AOP configuration from the given AdvisedSupport object, but allow substitution of a fresh TargetSource and a given interceptor chain.
 public int countAdvicesOfType(Class adviceClass) 
    Count advices of the given class.
 public AdvisorChainFactory getAdvisorChainFactory() 
    Return the advisor chain factory to use (never null).
 public final Advisor[] getAdvisors() 
 protected final List getAdvisorsInternal() 
 AdvisedSupport getConfigurationOnlyCopy() 
    Build a configuration-only copy of this AdvisedSupport, replacing the TargetSource
 public List getInterceptorsAndDynamicInterceptionAdvice(Method method,
    Class targetClass) 
 public Class[] getProxiedInterfaces() 
 public Class getTargetClass() 
 public TargetSource getTargetSource() 
 public int indexOf(Advisor advisor) 
 public int indexOf(Advice advice) 
 public boolean isInterfaceProxied(Class intf) 
 public boolean isPreFiltered() 
 public boolean removeAdvice(Advice advice) throws AopConfigException 
 public boolean removeAdvisor(Advisor advisor) 
 public  void removeAdvisor(int index) throws AopConfigException 
 public boolean removeInterface(Class intf) 
    Remove a proxied interface.

    Does nothing if the given interface isn't proxied.

 public boolean replaceAdvisor(Advisor a,
    Advisor b) throws AopConfigException 
 public  void setAdvisorChainFactory(AdvisorChainFactory advisorChainFactory) 
 public  void setInterfaces(Class[] interfaces) 
    Set the interfaces to be proxied.
 public  void setPreFiltered(boolean preFiltered) 
 public  void setTarget(Object target) 
    Set the given object as target. Will create a SingletonTargetSource for the object.
 public  void setTargetClass(Class targetClass) 
    Set a target class to be proxied, indicating that the proxy should be castable to the given class.

    Internally, an org.springframework.aop.target.EmptyTargetSource for the given target class will be used. The kind of proxy needed will be determined on actual creation of the proxy.

    This is a replacement for setting a "targetSource" or "target", for the case where we want a proxy based on a target class (which can be an interface or a concrete class) without having a fully capable TargetSource available.

 public  void setTargetSource(TargetSource targetSource) 
 public String toProxyConfigString() 
 public String toString() 
    For debugging/diagnostic use.
 protected final  void updateAdvisorArray() 
    Bring the array up to date with the list.