Class ResourceStatisticsImpl.Builder

  • Enclosing class:
    ResourceStatisticsImpl

    static class ResourceStatisticsImpl.Builder
    extends java.lang.Object
    Builder of resource statistics instances.

    Must be thread-safe.

    • Method Detail

      • addExecution

        void addExecution​(ResourceMethod resourceMethod,
                          long methodStartTime,
                          long methodDuration,
                          long requestStartTime,
                          long requestDuration)
        Add execution of a resource method in the resource.
        Parameters:
        resourceMethod - Resource method executed.
        methodStartTime - Time of execution of the resource method.
        methodDuration - Time spent on execution of resource method itself.
        requestStartTime - Time when the request matching to the executed resource method has been received by Jersey.
        requestDuration - Time of whole request processing (from receiving the request until writing the response).
      • addMethod

        void addMethod​(ResourceMethod resourceMethod)
        Add a resource method to the statistics.
        Parameters:
        resourceMethod - Resource method.