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()
    • 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. Calling InterceptorContext.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.