ServiceClient Class
- java.
lang. Object - com.
microsoft. bot. restclient. ServiceClient
- com.
public abstract class ServiceClient
ServiceClient is the abstraction for accessing REST operations and their payload data types.
Constructor Summary
| Modifier | Constructor | Description | |
|---|---|---|---|
| protected | ServiceClient(RestClient restClient) |
Initializes a new instance of the Service |
|
| protected | ServiceClient(String baseUrl) |
Initializes a new instance of the Service |
|
| protected | ServiceClient(String baseUrl, ServiceClientCredentials credentials) | ||
| protected | ServiceClient(String baseUrl, ServiceClientCredentials credentials, OkHttpClient.Builder clientBuilder, Retrofit.Builder restBuilder) |
Initializes a new instance of the Service |
|
| protected | ServiceClient(String baseUrl, OkHttpClient.Builder clientBuilder, Retrofit.Builder restBuilder) |
Initializes a new instance of the Service |
|
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| okhttp3.OkHttpClient | httpClient() |
|
Rest |
restClient() |
| retrofit2.Retrofit | retrofit() |
|
Serializer |
serializerAdapter() |
| java.lang.String |
userAgent()
The default User-Agent header. |
Methods inherited from java.lang.Object
Constructor Details
ServiceClient
protected ServiceClient(RestClient restClient)
Initializes a new instance of the ServiceClient class.
Parameters:
ServiceClient
protected ServiceClient(String baseUrl)
Initializes a new instance of the ServiceClient class.
Parameters:
ServiceClient
protected ServiceClient(String baseUrl, ServiceClientCredentials credentials)
Parameters:
ServiceClient
protected ServiceClient(String baseUrl, ServiceClientCredentials credentials, OkHttpClient.Builder clientBuilder, Retrofit.Builder restBuilder)
Initializes a new instance of the ServiceClient class.
Parameters:
ServiceClient
protected ServiceClient(String baseUrl, OkHttpClient.Builder clientBuilder, Retrofit.Builder restBuilder)
Initializes a new instance of the ServiceClient class.
Parameters:
Method Details
httpClient
public OkHttpClient httpClient()
Returns:
restClient
retrofit
public Retrofit retrofit()
Returns:
serializerAdapter
public SerializerAdapter serializerAdapter()
Returns:
userAgent
public String userAgent()
The default User-Agent header. Override this method to override the user agent.
Returns: