Class MonitoringStatisticsImpl.Builder

    • Constructor Detail

      • Builder

        Builder()
        Create a new builder.
      • Builder

        Builder​(ResourceModel resourceModel)
        Create a new builder and initialize it from resource model.
        Parameters:
        resourceModel - resource model.
    • Method Detail

      • processResource

        private void processResource​(Resource resource,
                                     java.lang.String pathPrefix)
      • getExceptionMapperStatisticsBuilder

        ExceptionMapperStatisticsImpl.Builder getExceptionMapperStatisticsBuilder()
        Get the exception mapper statistics builder.
        Returns:
        Builder of internal exception mapper statistics.
      • addRequestExecution

        void addRequestExecution​(long startTime,
                                 long duration)
        Add global request execution.
        Parameters:
        startTime - time of the execution.
        duration - duration of the execution.
      • addExecution

        void addExecution​(java.lang.String uri,
                          ResourceMethod resourceMethod,
                          long methodTime,
                          long methodDuration,
                          long requestTime,
                          long requestDuration)
        Add execution of a resource method.
        Parameters:
        uri - String uri which was executed.
        resourceMethod - Resource method.
        methodTime - Time spent on execution of resource method itself (Unix timestamp format).
        methodDuration - Time of execution of the resource method.
        requestTime - 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.
      • addResponseCode

        void addResponseCode​(int responseCode)
        Add a response status code produces by Jersey.
        Parameters:
        responseCode - Response status code.
      • build

        MonitoringStatisticsImpl build()
        Build a new instance of monitoring statistics.
        Returns:
        New instance of MonitoringStatisticsImpl.