org.neo.swarm.core.aop.silc.comp
Class AspectComponentImpl
java.lang.Object
java.lang.reflect.AccessibleObject
org.neo.swarm.core.aop.silc.comp.AspectComponentImpl
- All Implemented Interfaces:
- AspectComponent, java.io.Serializable
- public class AspectComponentImpl
- extends java.lang.reflect.AccessibleObject
- implements AspectComponent, java.io.Serializable
This class manages the interceptor chain for an aspected component.
- Author:
- damiang, navery
- See Also:
- Serialized Form
| Methods inherited from class java.lang.reflect.AccessibleObject |
isAccessible, setAccessible, setAccessible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AspectComponentImpl
public AspectComponentImpl(java.lang.Object key,
java.lang.Class[] interfaces,
java.lang.Object target,
ProxyFactory proxyFactory)
addInterceptor
public void addInterceptor(Perspective perspective,
MethodInterceptor methodInterceptor)
- Apply an interceptor to all methods - and if needed classify it using the given perspective.
- Specified by:
addInterceptor in interface AspectComponent
addInterceptor
public void addInterceptor(Perspective perspective,
java.lang.reflect.Method method,
MethodInterceptor interceptor)
- Apply interceptor to only one method.
- Specified by:
addInterceptor in interface AspectComponent
- Parameters:
method - interceptor -
getTarget
public java.lang.Object getTarget()
- Specified by:
getTarget in interface AspectComponent
getProxy
public java.lang.Object getProxy()
- Specified by:
getProxy in interface AspectComponent
getProxy
public java.lang.Object getProxy(Perspective perspective)
- Specified by:
getProxy in interface AspectComponent
getCGLibProxy
public java.lang.Object getCGLibProxy()
invokeMethod
public java.lang.Object invokeMethod(java.lang.Object key,
Perspective perspective,
java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- callback from the invocation handler - this is where we need to apply the associated perspective.
- Specified by:
invokeMethod in interface AspectComponent
- Throws:
java.lang.Throwable
getInterfaceMethods
public java.lang.reflect.Method[] getInterfaceMethods()
- Specified by:
getInterfaceMethods in interface AspectComponent
getInterfaces
public java.lang.Class[] getInterfaces()
- Specified by:
getInterfaces in interface AspectComponent
Copyright © 2001-2004 SWARM-ONE -First Generation (S)calable(W)ide(AR)ea(M)esh. All Rights Reserved.