Interface PostRequestMetricsSupport

public interface PostRequestMetricsSupport
Encapsulates metrics-related post-request processing that other components use and factory methods for creating instances of the related context.
  • Method Details

    • create

      static PostRequestMetricsSupport create()
      Creates a new instance.
      new instance
    • recordPostProcessingWork

      static void recordPostProcessingWork(ServerRequest request, BiConsumer<ServerResponse,Throwable> task)
      Records a post-processing task to be performed once the response has been sent to the client.
      request - ServerRequest with which to associate the post-processing task
      task - the work to perform
    • registerPostRequestWork

      void registerPostRequestWork(BiConsumer<ServerResponse,Throwable> task)
      Records post-request processing to be performed once the server sends the response to the client.
      task - the work to perform
    • runTasks

      void runTasks(ServerRequest request, ServerResponse response, Throwable throwable)
      Run the post-processing tasks.
      request - the ServerRequest from the client
      response - the ServerResponse already sent to the client
      throwable - the Throwable for any problem encountered in preparing the response; null if successful