public abstract class ServiceClient extends Object
Modifier | Constructor and Description |
---|---|
protected |
ServiceClient(RestClient restClient)
Initializes a new instance of the ServiceClient class.
|
protected |
ServiceClient(String baseUrl)
Initializes a new instance of the ServiceClient class.
|
protected |
ServiceClient(String baseUrl,
okhttp3.OkHttpClient.Builder clientBuilder,
retrofit2.Retrofit.Builder restBuilder)
Initializes a new instance of the ServiceClient class.
|
Modifier and Type | Method and Description |
---|---|
okhttp3.OkHttpClient |
httpClient() |
RestClient |
restClient() |
retrofit2.Retrofit |
retrofit() |
SerializerAdapter<?> |
serializerAdapter() |
protected ServiceClient(String baseUrl)
baseUrl
- the service endpointprotected ServiceClient(String baseUrl, okhttp3.OkHttpClient.Builder clientBuilder, retrofit2.Retrofit.Builder restBuilder)
baseUrl
- the service base uriclientBuilder
- the http client builderrestBuilder
- the retrofit rest client builderprotected ServiceClient(RestClient restClient)
restClient
- the REST clientpublic RestClient restClient()
RestClient
instance.public retrofit2.Retrofit retrofit()
public okhttp3.OkHttpClient httpClient()
public SerializerAdapter<?> serializerAdapter()
ObjectMapper
.Copyright © 2019. All rights reserved.