org.springframework.aop.IntroductionInterceptor interface.
Subclasses merely need to extend this class and implement the interfaces to be introduced themselves. In this case the delegate is the subclass instance itself. Alternatively a separate delegate may implement the interface, and be set via the delegate bean property.
Delegates or subclasses may implement any number of interfaces. All interfaces except IntroductionInterceptor are picked up from the subclass or delegate by default.
The suppressInterface method can be used to suppress interfaces
implemented by the delegate but which should not be introduced to the owning
AOP proxy.
An instance of this class is serializable if the delegate is.
suppressInterface, DelegatePerTargetObjectIntroductionInterceptor
| Modifier and Type | Field and Description |
|---|---|
| private Object | delegate
Object that actually implements the interfaces. |
| Access | Constructor and Description |
|---|---|
| public | DelegatingIntroductionInterceptor(Object
the delegate that implements the introduced interfaces delegate)Construct a new DelegatingIntroductionInterceptor, providing a delegate that implements the interfaces to be introduced. |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | doProceed(MethodInvocation mi)
Proceed with the supplied |
| private void | |
| public Object | invoke(MethodInvocation
the method invocation joinpoint mi)Implements org. Subclasses may need to override this if they want to perform custom behaviour in around advice. |
| delegate | back to summary |
|---|---|
| private Object delegate Object that actually implements the interfaces. May be "this" if a subclass implements the introduced interfaces. | |
| DelegatingIntroductionInterceptor | back to summary |
|---|---|
| public DelegatingIntroductionInterceptor(Object delegate) Construct a new DelegatingIntroductionInterceptor, providing a delegate that implements the interfaces to be introduced.
| |
| DelegatingIntroductionInterceptor | back to summary |
|---|---|
| protected DelegatingIntroductionInterceptor() Construct a new DelegatingIntroductionInterceptor. The delegate will be the subclass, which must implement additional interfaces. | |
| doProceed | back to summary |
|---|---|
| protected Object doProceed(MethodInvocation mi) throws Throwable Proceed with the supplied
| |
| init | back to summary |
|---|---|
| private void init(Object delegate) Both constructors use this init method, as it is impossible to pass a "this" reference from one constructor to another.
| |
| invoke | back to summary |
|---|---|
| public Object invoke(MethodInvocation mi) throws Throwable Implements org. 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.
| |