public class

DelegatePerTargetObjectIntroductionInterceptor

extends IntroductionInfoSupport
implements IntroductionInterceptor
java.lang.Object
   ↳ org.springframework.aop.support.IntroductionInfoSupport
     ↳ org.springframework.aop.support.DelegatePerTargetObjectIntroductionInterceptor

Class Overview

Convenient implementation of the IntroductionInterceptor interface.

This differs from DelegatingIntroductionInterceptor in that a single instance of this class can be used to advise multiple target objects, and each target object will have its own delegate (whereas DelegatingIntroductionInterceptor shares the same delegate, and hence the same state across all targets).

The suppressInterface method can be used to suppress interfaces implemented by the delegate class but which should not be introduced to the owning AOP proxy.

An instance of this class is serializable if the delegates are.

Note: There are some implementation similarities between this class and DelegatingIntroductionInterceptor that suggest a possible refactoring to extract a common ancestor class in the future.

Summary

[Expand]
Inherited Fields
From class org.springframework.aop.support.IntroductionInfoSupport
Public Constructors
DelegatePerTargetObjectIntroductionInterceptor(Class defaultImplType, Class interfaceType)
Public Methods
Object invoke(MethodInvocation mi)
Subclasses may need to override this if they want to perform custom behaviour in around advice.
Protected Methods
Object doProceed(MethodInvocation mi)
Proceed with the supplied org.aopalliance.intercept.MethodInterceptor.
[Expand]
Inherited Methods
From class org.springframework.aop.support.IntroductionInfoSupport
From class java.lang.Object
From interface org.springframework.aop.DynamicIntroductionAdvice
From interface org.springframework.aop.IntroductionInfo

Public Constructors

public DelegatePerTargetObjectIntroductionInterceptor (Class defaultImplType, Class interfaceType)

Public Methods

public Object invoke (MethodInvocation mi)

Subclasses may need to override this if they want to perform custom behaviour in around advice. However, subclasses should invoke this method, which handles introduced interfaces and forwarding to the target.

Throws
Throwable

Protected Methods

protected Object doProceed (MethodInvocation mi)

Proceed with the supplied org.aopalliance.intercept.MethodInterceptor. Subclasses can override this method to intercept method invocations on the target object which is useful when an introduction needs to monitor the object that it is introduced into. This method is never called for MethodInvocation MethodInvocations on the introduced interfaces.

Throws
Throwable