Package org.azd.abstractions
Class InstanceFactory
java.lang.Object
org.azd.abstractions.InstanceFactory
Factory class to create an instance of request and response object.
-
Method Summary
Modifier and TypeMethodDescriptionstatic HttpClient
Creates an instance of HttpClient.static HttpRequest
createHttpRequest
(AccessTokenCredential accessTokenCredential, RequestInformation requestInformation) Creates an instance of HttpRequest.static ResponseHandler
createResponseHandler
(AccessTokenCredential accessTokenCredential, RequestInformation requestInformation) Creates an instance of response handler object.static SerializerContext
Creates an instance of serializer context.
-
Method Details
-
createSerializerContext
Creates an instance of serializer context.- Returns:
- SerializerContext
SerializerContext
.
-
createHttpClient
Creates an instance of HttpClient.- Returns:
- HttpClient
HttpClient
.
-
createHttpRequest
public static HttpRequest createHttpRequest(AccessTokenCredential accessTokenCredential, RequestInformation requestInformation) Creates an instance of HttpRequest.- Parameters:
accessTokenCredential
- Access token credential object.requestInformation
- Request information object to set the request url, request body.- Returns:
- HttpRequest object
HttpRequest
.
-
createResponseHandler
public static ResponseHandler createResponseHandler(AccessTokenCredential accessTokenCredential, RequestInformation requestInformation) Creates an instance of response handler object.- Parameters:
accessTokenCredential
- Access token credential object.requestInformation
- Request information object to set the request url, request body.- Returns:
- ResponseHandler
ResponseHandler
.
-