public interface Interceptor<T,C extends Context<T>> extends Comparable<Interceptor<T,C>>
Modifier and Type | Method and Description |
---|---|
default int |
compareTo(Interceptor other)
实现的排序方法。
无特殊需求请不要重写此方法。
|
boolean |
intercept(C context)
拦截执行函数
|
default int |
sort()
排序方法,默认为
PriorityConstant.FIRST_LAST 。
无特殊排序需求则不用重写此方法。 |
default int sort()
PriorityConstant.FIRST_LAST
。
无特殊排序需求则不用重写此方法。boolean intercept(C context)
context
- 上下文对象default int compareTo(Interceptor other)
compareTo
in interface Comparable<Interceptor<T,C extends Context<T>>>
Copyright © 2020. All rights reserved.