Package org.azd.abstractions.internals
Class ClientRequestAdapter
java.lang.Object
org.azd.http.ClientRequest
org.azd.abstractions.internals.ClientRequestAdapter
Implementation of the ClientRequest that executes or sends the request to
Azure DevOps API.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.azd.http.ClientRequest
ClientRequest.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the access token credential object.<T extends SerializableEntity>
TExecutes the request and returns the deserialized response.<T extends SerializableEntity>
CompletableFuture<T>executeAsync(Class<T> model) Executes the request and returns the deserialized response.Executes the request built by ClientRequest.Builder and doesn't return any response.Executes the request built by ClientRequest.Builder and doesn't return any response.Executes the request and returns the stream response from API.Executes the request and returns the stream response from API.Executes the raw request without serialization.Executes the raw request without serialization.request()Return the request information object.Methods inherited from class org.azd.http.ClientRequest
builder, builder
-
Constructor Details
-
ClientRequestAdapter
Default.- Parameters:
builder- Client request builder object.
-
-
Method Details
-
executeStringAsync
Executes the raw request without serialization.- Specified by:
executeStringAsyncin classClientRequest- Returns:
- String response from API.
-
executeAsync
Executes the request and returns the deserialized response.- Specified by:
executeAsyncin classClientRequest- Type Parameters:
T- Represents model.- Parameters:
model- Represents the entity or model for which the response should be deserialized to.- Returns:
- Deserialized response from API.
-
executeStreamAsync
Executes the request and returns the stream response from API.- Specified by:
executeStreamAsyncin classClientRequest- Returns:
- Stream response.
InputStream
-
executePrimitiveAsync
Executes the request built by ClientRequest.Builder and doesn't return any response. This is mainly used for Api calls that returns 201 or any operation that doesn't return response.- Specified by:
executePrimitiveAsyncin classClientRequest- Returns:
- Future void.
-
execute
Executes the request and returns the deserialized response.- Specified by:
executein classClientRequest- Type Parameters:
T- Represents model.- Parameters:
model- Represents the entity or model for which the response should be deserialized to.- Returns:
- Deserialized response from API.
- Throws:
AzDException- Default API exception handler.
-
executeString
Executes the raw request without serialization.- Specified by:
executeStringin classClientRequest- Returns:
- String response from API.
- Throws:
AzDException- Default API exception handler.
-
executeStream
Executes the request and returns the stream response from API.- Specified by:
executeStreamin classClientRequest- Returns:
- Stream response.
InputStream - Throws:
AzDException- Default API exception handler.
-
executePrimitive
Executes the request built by ClientRequest.Builder and doesn't return any response. This is mainly used for Api calls that returns 201 or any operation that doesn't return response.- Specified by:
executePrimitivein classClientRequest- Returns:
- Future void.
- Throws:
AzDException- Default Api exception handler.
-
request
Return the request information object.- Specified by:
requestin classClientRequest- Returns:
- RequestInformation
RequestInformation
-
accessTokenCredential
Returns the access token credential object.- Specified by:
accessTokenCredentialin classClientRequest- Returns:
- AccessTokenCredential
AccessTokenCredential
-