Package com.atlan.net

Class AtlanEventStreamResponse

java.lang.Object
com.atlan.net.AtlanEventStreamResponse

public class AtlanEventStreamResponse extends Object
A response from Atlan's API, with body represented as a list of Strings (one element in the list per event emitted from the event stream).
  • Constructor Details

    • AtlanEventStreamResponse

      public AtlanEventStreamResponse(int code, HttpHeaders headers, List<String> events)
      Initializes a new instance of the AtlanEventStreamResponse class.
      Parameters:
      code - the HTTP status code of the response
      headers - the HTTP headers of the response
      events - the events emitted in the response
      Throws:
      NullPointerException - if headers or events is null
  • Method Details

    • code

      public final int code()
    • headers

      public final HttpHeaders headers()
    • body

      public final List<String> 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.