org.easetech.easytest.interceptor
Class InternalSpringInterceptor

java.lang.Object
  extended by org.easetech.easytest.interceptor.InternalSpringInterceptor
All Implemented Interfaces:
org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

public class InternalSpringInterceptor
extends Object
implements org.aopalliance.intercept.MethodInterceptor

A internal implementation of the MethodInterceptor implementation that hides the implementation logic of intercepting the method call from the user. It always has an instance of MethodIntercepter whose MethodIntercepter.intercept(Method, Object, Object[]) method is called internally. The actual implementation of the MethodIntercepter is provided by the user as an attribute to the Intercept annotation. If none is provided, then DefaultMethodIntercepter implementation is used.

Author:
Anuj Kumar

Field Summary
protected static org.slf4j.Logger LOG
          An instance of logger associated with the test framework.
 
Constructor Summary
InternalSpringInterceptor()
           
 
Method Summary
 org.easetech.easytest.interceptor.MethodIntercepter getUserIntercepter()
          Return an instance of MethodIntercepter.
 Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
          Intercept the method with the advice
 void setUserIntercepter(org.easetech.easytest.interceptor.MethodIntercepter userIntercepter)
          Set the user interceptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.slf4j.Logger LOG
An instance of logger associated with the test framework.

Constructor Detail

InternalSpringInterceptor

public InternalSpringInterceptor()
Method Detail

invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation invocation)
              throws Throwable
Intercept the method with the advice

Specified by:
invoke in interface org.aopalliance.intercept.MethodInterceptor
Parameters:
invocation -
Returns:
returned value
Throws:
Throwable

getUserIntercepter

public org.easetech.easytest.interceptor.MethodIntercepter getUserIntercepter()
Return an instance of MethodIntercepter. See the class javadocs for details.

Returns:
the userIntercepter

setUserIntercepter

public void setUserIntercepter(org.easetech.easytest.interceptor.MethodIntercepter userIntercepter)
Set the user interceptor

Parameters:
userIntercepter - the userIntercepter to set


Copyright © 2013. All Rights Reserved.