org.equilibriums.aop.utils.interceptor.composite
Class CompositeDelegateInterceptor
java.lang.Object
org.equilibriums.aop.utils.interceptor.composite.CompositeDelegateInterceptor
- All Implemented Interfaces:
- org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor
public class CompositeDelegateInterceptor
- extends Object
- implements org.aopalliance.intercept.MethodInterceptor
Will delegate method calls this interceptor is configured for to specified list of delegates.
Return value from delegate calls are handled by first ReturnValueHandler that will return true from its
ReturnValueHandler.supports(java.lang.Class extends java.lang.Object>, java.lang.Object[]) method.
If no ReturnValueHandler are specified will return null or result of invocation.proceed() if proceed property is true (false by default).
For more on how to use this interceptor see Overview section of this Javadoc.
- Author:
- Tsolak Petrosian
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CompositeDelegateInterceptor
public CompositeDelegateInterceptor()
isProceed
public boolean isProceed()
setProceed
public void setProceed(boolean proceed)
getDelegates
public Object[] getDelegates()
setDelegates
public void setDelegates(Object[] delegates)
getDelegateReturnValueHandlers
public ReturnValueHandler[] getDelegateReturnValueHandlers()
setDelegateReturnValueHandlers
public void setDelegateReturnValueHandlers(ReturnValueHandler[] delegateReturnValueHandlers)
invoke
public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
throws Throwable
- Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
- Throws:
Throwable
Copyright © 2011. All Rights Reserved.