Class AbstractScannedMethodInterceptor
- java.lang.Object
-
- net.cofcool.chaos.server.core.aop.AbstractScannedMethodInterceptor
-
- All Implemented Interfaces:
ScannedMethodInterceptor
- Direct Known Subclasses:
ApiProcessingInterceptor,LoggingInterceptor,ValidateInterceptor
public abstract class AbstractScannedMethodInterceptor extends Object implements ScannedMethodInterceptor
抽象类, 实现 ScannedMethodInterceptor 接口, 推荐应用继承该类, 而不是直接实现 ScannedMethodInterceptor- Author:
- CofCool
-
-
Constructor Summary
Constructors Constructor Description AbstractScannedMethodInterceptor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoAfter(org.aopalliance.intercept.MethodInvocation invocation, Object returnValue)invocation 调用后调用protected voiddoBefore(org.aopalliance.intercept.MethodInvocation invocation)invocation 调用前调用protected abstract booleandoSupport(Method method, Class<?> targetClass)是否支持voidpostAfter(org.aopalliance.intercept.MethodInvocation invocation, Object returnValue)MethodInvocation 调用之后调用voidpostBefore(org.aopalliance.intercept.MethodInvocation invocation)MethodInvocation 调用之前调用booleansupports(Method method)是否可以处理该 method
-
-
-
Method Detail
-
supports
public boolean supports(Method method)
Description copied from interface:ScannedMethodInterceptor是否可以处理该 method- Specified by:
supportsin interfaceScannedMethodInterceptor
-
doSupport
protected abstract boolean doSupport(Method method, Class<?> targetClass)
是否支持- Parameters:
method- methodtargetClass- targetClass- Returns:
- 是否支持
-
postBefore
public void postBefore(org.aopalliance.intercept.MethodInvocation invocation) throws ThrowableDescription copied from interface:ScannedMethodInterceptorMethodInvocation 调用之前调用- Specified by:
postBeforein interfaceScannedMethodInterceptor- Throws:
Throwable
-
postAfter
public void postAfter(org.aopalliance.intercept.MethodInvocation invocation, Object returnValue) throws ThrowableDescription copied from interface:ScannedMethodInterceptorMethodInvocation 调用之后调用- Specified by:
postAfterin interfaceScannedMethodInterceptor- Parameters:
invocation- invocationreturnValue- 方法返回值,当发生异常时为异常对象- Throws:
Throwable
-
doBefore
protected void doBefore(org.aopalliance.intercept.MethodInvocation invocation) throws Throwableinvocation 调用前调用- Throws:
Throwable
-
-