Package com.atlan.net

Class AtlanResponseStream

java.lang.Object
com.atlan.net.AtlanResponseStream

public class AtlanResponseStream extends Object
Class for handling API interactions as streams.
  • Constructor Details

    • AtlanResponseStream

      public AtlanResponseStream(int code, HttpHeaders headers, InputStream body)
      Initializes a new instance of the AtlanResponseStream class.
      Parameters:
      code - the HTTP status code of the response
      headers - the HTTP headers of the response
      body - streaming body response
      Throws:
      NullPointerException - if headers or body is null
  • Method Details

    • code

      public final int code()
    • headers

      public final HttpHeaders headers()
    • body

      public final InputStream body()
    • date

      public Instant date()
      Gets the date of the request, as returned by Atlan.
      Returns:
      the date of the request, as returned by Atlan
    • metrics

      public RequestMetrics metrics()
      The metrics of the request / response round-trip, if enabled. Note: if retries are also enabled, this will contain ONLY the metrics for the final retry and no others.
    • numRetries

      public int numRetries()
      Number of times the request was retried. Used for internal tests only.