Interface HttpResult

  • All Known Implementing Classes:
    DefaultHttpResult

    public interface HttpResult
    An operation result of HTTP.
    Since:
    1.1
    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      default long nanoUsed()
      Returns the time between the request coming and when the response has finished being written out to the connection, in nanoseconds.
      HttpRequestContext requestContext()
      Returns the context of the HTTP request.
      long respondedNaonTime()
      Returns the value of the running Java Virtual Machine'shigh-resolution time source, in nanoseconds, when the HTTP response just responded.
      java.time.ZonedDateTime respondedTime()
      Returns the ZonedDateTime with the system ZoneId when the HTTP response just responded.
      default java.time.ZonedDateTime respondedTime​(java.time.ZoneId zone)
      Returns the ZonedDateTime with the specified ZoneId when the HTTP response just responded.
      io.netty.handler.codec.http.HttpResponseStatus responseStatus()
      Returns the status of the HTTP response.
      long resultLength()
      Returns the length of the HTTP response content.
      default long timeUsed​(java.util.concurrent.TimeUnit unit)
      Returns the time between the request coming and when the response has finished being written out to the connection, in specified time unit.
    • Method Detail

      • requestContext

        HttpRequestContext requestContext()
        Returns the context of the HTTP request.
        Returns:
        the context of the HTTP request
      • resultLength

        long resultLength()
        Returns the length of the HTTP response content.
        Returns:
        the length of the HTTP response content
      • responseStatus

        io.netty.handler.codec.http.HttpResponseStatus responseStatus()
        Returns the status of the HTTP response.
        Returns:
        the status of the HTTP response
      • respondedNaonTime

        long respondedNaonTime()
        Returns the value of the running Java Virtual Machine'shigh-resolution time source, in nanoseconds, when the HTTP response just responded.
        Returns:
        the value of the running Java Virtual Machine'shigh-resolution time source, in nanoseconds
        See Also:
        System.nanoTime()
      • respondedTime

        java.time.ZonedDateTime respondedTime()
        Returns the ZonedDateTime with the system ZoneId when the HTTP response just responded.
        Returns:
        a ZonedDateTime
      • respondedTime

        default java.time.ZonedDateTime respondedTime​(java.time.ZoneId zone)
        Returns the ZonedDateTime with the specified ZoneId when the HTTP response just responded.
        Parameters:
        zone - the ZoneId
        Returns:
        a ZonedDateTime with the specified zone
      • nanoUsed

        default long nanoUsed()
        Returns the time between the request coming and when the response has finished being written out to the connection, in nanoseconds.
        Returns:
        the time between the request coming and when the response has finished being written out to the connection, in nanoseconds
      • timeUsed

        default long timeUsed​(java.util.concurrent.TimeUnit unit)
        Returns the time between the request coming and when the response has finished being written out to the connection, in specified time unit.
        Parameters:
        unit - the time unit
        Returns:
        the time between the request coming and when the response has finished being written out to the connection, in specified unit