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