org.springframework.aop.framework.adapter

Interface AdvisorAdapterRegistry

  • All Known Implementing Classes:
    DefaultAdvisorAdapterRegistry


    public interface AdvisorAdapterRegistry
    Interface for registries of Advisor adapters.

    This is an SPI interface, not to be implemented by any Spring user.

    Author:
    Rod Johnson, Rob Harrop
    • Method Detail

      • getInterceptors

        MethodInterceptor[] getInterceptors(Advisor advisor)
                                     throws UnknownAdviceTypeException
        Return an array of AOP Alliance MethodInterceptors to allow use of the given Advisor in an interception-based framework.

        Don't worry about the pointcut associated with the Advisor, if it is a PointcutAdvisor: just return an interceptor.

        Parameters:
        advisor - the Advisor to find an interceptor for
        Returns:
        an array of MethodInterceptors to expose this Advisor's behavior
        Throws:
        UnknownAdviceTypeException - if the Advisor type is not understood by any registered AdvisorAdapter
      • registerAdvisorAdapter

        void registerAdvisorAdapter(AdvisorAdapter adapter)
        Register the given AdvisorAdapter. Note that it is not necessary to register adapters for an AOP Alliance Interceptors or Spring Advices: these must be automatically recognized by an AdvisorAdapterRegistry implementation.
        Parameters:
        adapter - an AdvisorAdapter that understands particular Advisor or Advice types