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 and doesn't return any response.Executes the request 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.
- Throws:
AzDException- Default API exception handler.
-
executeAsync
public <T extends SerializableEntity> CompletableFuture<T> executeAsync(Class<T> model) throws AzDException 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.
- Throws:
AzDException- Default API exception handler.
-
executeStreamAsync
Executes the request and returns the stream response from API.- Specified by:
executeStreamAsyncin classClientRequest- Returns:
- Stream response.
InputStream - Throws:
AzDException- Default API exception handler.
-
executePrimitiveAsync
Executes the request and doesn't return any response. Useful for DELETE operations.- Specified by:
executePrimitiveAsyncin classClientRequest- Returns:
- Void.
- Throws:
AzDException- Default API exception handler.
-
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 and doesn't return any response. Useful for DELETE operations.- Specified by:
executePrimitivein classClientRequest- Returns:
- 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
-