Package com.atlan.net
Class AtlanResponseStream
java.lang.Object
com.atlan.net.AtlanResponseStream
Class for handling API interactions as streams.
-
Constructor Summary
ConstructorsConstructorDescriptionAtlanResponseStream(int code, HttpHeaders headers, InputStream body) Initializes a new instance of theAtlanResponseStreamclass. -
Method Summary
Modifier and TypeMethodDescriptionfinal InputStreambody()final intcode()date()Gets the date of the request, as returned by Atlan.final HttpHeadersheaders()metrics()The metrics of the request / response round-trip, if enabled.intNumber of times the request was retried.
-
Constructor Details
-
AtlanResponseStream
Initializes a new instance of theAtlanResponseStreamclass.- Parameters:
code- the HTTP status code of the responseheaders- the HTTP headers of the responsebody- streaming body response- Throws:
NullPointerException- ifheadersorbodyisnull
-
-
Method Details
-
code
public final int code() -
headers
-
body
-
date
Gets the date of the request, as returned by Atlan.- Returns:
- the date of the request, as returned by Atlan
-
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.
-