Interface CompletionCallback


  • public interface CompletionCallback
    A request processing callback that receives request processing completion events.

    A completion callback is always invoked when the whole request processing is over, i.e. once a response for the request has been processed and sent back to the client (including processing by a custom exception mapper) or when an unmapped exception or error is being propagated to the default exception mapper.

    Since:
    2.0
    Author:
    Marek Potociar
    • Method Detail

      • onComplete

        void onComplete​(Throwable throwable)
        An unmapped throwable is propagated to the default exception mapper in case no exception mapper has been found for a request processing failure. In this case a non-null unmapped throwable instance is passed to the method. Note that the throwable instance represents the actual unmapped exception thrown during the request processing before it has been mapped to the response by the default exception mapper.
        Parameters:
        throwable - is null, if the request processing has completed with a response that has been sent to the client (including processing by a custom exception mapper). In case the request processing resulted in an unmapped exception or error that has yet to be propagated to the default exception mapper, this parameter contains the unmapped exception instance.