Class ResourceMethodStatisticsImpl.Builder

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.ResourceMethodStatisticsImpl.Builder
Enclosing class:
ResourceMethodStatisticsImpl

static class ResourceMethodStatisticsImpl.Builder extends Object
Builder of resource method statistics.

Must be thread-safe.

  • Field Details

  • Constructor Details

    • Builder

      Builder(ResourceMethod resourceMethod)
      Create a new builder instance.
      Parameters:
      resourceMethod - Resource method for which statistics are evaluated.
  • Method Details

    • build

      Build an instance of resource method statistics.
      Returns:
      New instance of resource method statistics.
    • addResourceMethodExecution

      void addResourceMethodExecution(long methodStartTime, long methodDuration, long requestStartTime, long requestDuration)
      Add execution of the resource method to the statistics.
      Parameters:
      methodStartTime - Time spent on execution of resource method itself (Unix timestamp format).
      methodDuration - Time of execution of the resource method.
      requestStartTime - Time of whole request processing (from receiving the request until writing the response). (Unix timestamp format)
      requestDuration - Time when the request matching to the executed resource method has been received by Jersey.