Interface Interceptor<Request,Response>
-
- All Superinterfaces:
Serializable
public interface Interceptor<Request,Response> extends Serializable
The Interceptor allows to intercept the invocation.This is useful to provide logging, fallback, exception, transform or substitute values.
- See Also:
ActionFilter.order()
-
-
Field Summary
Fields Modifier and Type Field Description static InterceptorEMPTY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Responseintercept(Request request, InterceptorContext<Request,Response> context)Intercept the invocation and return the corresponding response or a custom response built by the interceptor.
-
-
-
Field Detail
-
EMPTY
static final Interceptor EMPTY
-
-
Method Detail
-
intercept
Response intercept(Request request, InterceptorContext<Request,Response> context)
Intercept the invocation and return the corresponding response or a custom response built by the interceptor. CallingInterceptorContext.proceed(java.lang.Object)will continue to execute the interceptor chain. The chain can be short-circuited by returning another instance of response- Parameters:
request- the request being intercepted.context- the interceptor context.
-
-