Package com.microsoft.rest
Class ServiceClient
- java.lang.Object
-
- com.microsoft.rest.ServiceClient
-
public abstract class ServiceClient extends Object
ServiceClient is the abstraction for accessing REST operations and their payload data types.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedServiceClient(RestClient restClient)Initializes a new instance of the ServiceClient class.protectedServiceClient(String baseUrl)Initializes a new instance of the ServiceClient class.protectedServiceClient(String baseUrl, okhttp3.OkHttpClient.Builder clientBuilder, retrofit2.Retrofit.Builder restBuilder)Initializes a new instance of the ServiceClient class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description okhttp3.OkHttpClienthttpClient()RestClientrestClient()retrofit2.Retrofitretrofit()SerializerAdapter<?>serializerAdapter()
-
-
-
Constructor Detail
-
ServiceClient
protected ServiceClient(String baseUrl)
Initializes a new instance of the ServiceClient class.- Parameters:
baseUrl- the service endpoint
-
ServiceClient
protected ServiceClient(String baseUrl, okhttp3.OkHttpClient.Builder clientBuilder, retrofit2.Retrofit.Builder restBuilder)
Initializes a new instance of the ServiceClient class.- Parameters:
baseUrl- the service base uriclientBuilder- the http client builderrestBuilder- the retrofit rest client builder
-
ServiceClient
protected ServiceClient(RestClient restClient)
Initializes a new instance of the ServiceClient class.- Parameters:
restClient- the REST client
-
-
Method Detail
-
restClient
public RestClient restClient()
- Returns:
- the
RestClientinstance.
-
retrofit
public retrofit2.Retrofit retrofit()
- Returns:
- the Retrofit instance.
-
httpClient
public okhttp3.OkHttpClient httpClient()
- Returns:
- the HTTP client.
-
serializerAdapter
public SerializerAdapter<?> serializerAdapter()
- Returns:
- the adapter to a Jackson
ObjectMapper.
-
-