com.interface21.aop.framework
Class DelegatingIntroductionInterceptor
java.lang.Object
|
+--com.interface21.aop.framework.DelegatingIntroductionInterceptor
- All Implemented Interfaces:
- org.aopalliance.Interceptor, IntroductionInterceptor, org.aopalliance.MethodInterceptor
- public class DelegatingIntroductionInterceptor
- extends java.lang.Object
- implements IntroductionInterceptor
All subclasses need to do is extend this 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.
- Version:
- $Id: DelegatingIntroductionInterceptor.java,v 1.3 2003/05/28 16:39:11 jhoeller Exp $
- Author:
- Rod Johnson
|
Field Summary |
protected org.apache.commons.logging.Log |
logger
|
|
Method Summary |
java.lang.Class[] |
getIntroducedInterfaces()
Return the introduced interfaces added by this object |
java.lang.Object |
invoke(org.aopalliance.MethodInvocation invocation)
|
void |
suppressInterface(java.lang.Class intf)
Suppress the specified interface, which will have
been autodetected due to its implementation by
the delegate.
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected final org.apache.commons.logging.Log logger
DelegatingIntroductionInterceptor
public DelegatingIntroductionInterceptor(java.lang.Object delegate)
- Construct a new DelegatingIntroductionInterceptor, providing
a delegate that implements the interfaces to be introduced.
- Parameters:
delegate - the delegate that implements the introduced interfaces
DelegatingIntroductionInterceptor
protected DelegatingIntroductionInterceptor()
- Construct a new DelegatingIntroductionInterceptor.
The delegate will be the subclass, which must implement
additional interfaces.
suppressInterface
public void suppressInterface(java.lang.Class intf)
- Suppress the specified interface, which will have
been autodetected due to its implementation by
the delegate.
Does nothing if it's not implemented by the delegate
- Parameters:
intf - interface to suppress
getIntroducedInterfaces
public java.lang.Class[] getIntroducedInterfaces()
- Description copied from interface:
IntroductionInterceptor
- Return the introduced interfaces added by this object
- Specified by:
getIntroducedInterfaces in interface IntroductionInterceptor
- See Also:
com.interface21.aop.framework.AspectInterfaceInterceptor#getAspectInterfaces()
invoke
public final java.lang.Object invoke(org.aopalliance.MethodInvocation invocation)
throws java.lang.Throwable
- Specified by:
invoke in interface org.aopalliance.MethodInterceptor
- See Also:
com.interface21.aop.Interceptor#invoke(Invocation)
Rod Johnson and Spring contributors 2001-2003.