Class HttpFetcherRequest.Diagnostics

  • Enclosing class:
    HttpFetcherRequest

    public static final class HttpFetcherRequest.Diagnostics
    extends Object
    This class contains the diagnostic information for this request.
    • Method Detail

      • setStart

        public void setStart()
        Set the start time to current nano time.
      • setAcknowledge

        public void setAcknowledge()
        Set the acknowledge time to current nano time.
      • setComplete

        public void setComplete()
        Set the complete time to current nano time.
      • getStart

        @Nullable
        public Long getStart()
        Get the start time of the request. Returns null if the start time has not been set.
        Returns:
        Time started
      • getAcknowledge

        @Nullable
        public Long getAcknowledge()
        Get the acknowledge time of the request. Returns null if the acknowledge time has not been set.
        Returns:
        Time acknowledged
      • getComplete

        @Nullable
        public Long getComplete()
        Get the complete time of the request. Returns null if the complete time has not been set.
        Returns:
        Time completed
      • getSize

        @Nullable
        public Integer getSize()
        Get the size the response. Returns null if the response size has not been set.
        Returns:
        Response size
      • setSize

        public void setSize​(int size)
        Set the size of the response in bytes.
        Parameters:
        size - Size of the response.
      • getLatency

        @Nullable
        public Long getLatency()
        Get the latency between sending of the request and the first response. Returns null if isAcknowledged() is false.
        Returns:
        Time acknowledged
      • getSpeed

        @Nullable
        public Double getSpeed()
        Get download speed in bytes per second. Returns null if isCompleted() is false.
        Returns:
        Download speed
      • isStarted

        public boolean isStarted()
        Check if request has been started.
        Returns:
        True if request is started
      • isAcknowledged

        public boolean isAcknowledged()
        Check if request has been started and acknowledged.
        Returns:
        True if request is started and acknowledged
      • isCompleted

        public boolean isCompleted()
        Check if request has been started, acknowledged and completed.
        Returns:
        True if request is started, acknowledged and completed