org.jboss.ejb3.common.proxy.spi
Class InterceptorChainInvocationHandler

java.lang.Object
  extended by org.jboss.ejb3.common.proxy.spi.InterceptorChainInvocationHandler
All Implemented Interfaces:
java.io.Serializable, java.lang.reflect.InvocationHandler

public class InterceptorChainInvocationHandler
extends java.lang.Object
implements java.io.Serializable, java.lang.reflect.InvocationHandler

InterceptorChainInvocationHandler A Proxy InvocationHandler which will first pass the invocation through an interceptor chain before carrying on

See Also:
Serialized Form

Constructor Summary
InterceptorChainInvocationHandler(org.jboss.aop.advice.Interceptor[] interceptorChain, java.lang.Object target)
           
InterceptorChainInvocationHandler(java.util.List<org.jboss.aop.advice.Interceptor> interceptorChain, java.lang.Object target)
           
 
Method Summary
protected  void addArgumentsToInvocation(org.jboss.aop.joinpoint.MethodInvocation invocation, java.lang.Object[] originalArguments)
          Sets the specified arguments on the specified invocation.
protected  org.jboss.aop.joinpoint.MethodInvocation constructMethodInvocation(java.lang.reflect.Method method, java.lang.Object[] args)
          Constructs a MethodInvocation from the specified Method and arguments
protected  org.jboss.aop.advice.Interceptor[] getInterceptorChain()
           
protected  java.lang.Object getTarget()
           
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InterceptorChainInvocationHandler

public InterceptorChainInvocationHandler(org.jboss.aop.advice.Interceptor[] interceptorChain,
                                         java.lang.Object target)

InterceptorChainInvocationHandler

public InterceptorChainInvocationHandler(java.util.List<org.jboss.aop.advice.Interceptor> interceptorChain,
                                         java.lang.Object target)
Method Detail

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

constructMethodInvocation

protected org.jboss.aop.joinpoint.MethodInvocation constructMethodInvocation(java.lang.reflect.Method method,
                                                                             java.lang.Object[] args)
Constructs a MethodInvocation from the specified Method and arguments

Parameters:
method -
args -
Returns:

addArgumentsToInvocation

protected void addArgumentsToInvocation(org.jboss.aop.joinpoint.MethodInvocation invocation,
                                        java.lang.Object[] originalArguments)
Sets the specified arguments on the specified invocation. Extracted to provide indirection such that the arguments set on the invocation may be different from those originally passed in.

Parameters:
invocation -
originalArguments -

getInterceptorChain

protected org.jboss.aop.advice.Interceptor[] getInterceptorChain()

getTarget

protected java.lang.Object getTarget()