| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CMAClient |
build() |
okhttp3.OkHttpClient.Builder |
defaultCoreCallFactoryBuilder() |
okhttp3.OkHttpClient.Builder |
defaultUploadCallFactoryBuilder() |
CMAClient.Builder |
setAccessToken(String accessToken)
Sets the access token for this client.
|
CMAClient.Builder |
setCallbackExecutor(Executor executor)
Sets the executor to use when invoking asynchronous callbacks.
|
CMAClient.Builder |
setCoreCallFactory(okhttp3.Call.Factory callFactory)
Sets a custom HTTP call factory for core modules.
|
CMAClient.Builder |
setCoreEndpoint(String remoteUrl)
Overrides the default remote URL for core modules.
|
CMAClient.Builder |
setLogger(Logger logger)
Sets the logger to be used for logging all network requests or all application requests.
|
CMAClient.Builder |
setLogLevel(Logger.Level logLevel)
Sets the log level for this client.
|
CMAClient.Builder |
setUploadCallFactory(okhttp3.Call.Factory callFactory)
Sets a custom HTTP call factory for the upload module.
|
CMAClient.Builder |
setUploadEndpoint(String remoteUrl)
Overrides the remote URL for upload module.
|
public CMAClient.Builder setCoreEndpoint(String remoteUrl)
remoteUrl - String representing the remote URLCMAClient.Builder instancesetUploadEndpoint(String)public CMAClient.Builder setUploadEndpoint(String remoteUrl)
remoteUrl - String representing the remote URLCMAClient.Builder instancesetCoreEndpoint(String)public CMAClient.Builder setAccessToken(String accessToken)
accessToken - access tokenCMAClient.Builder instancepublic CMAClient.Builder setCoreCallFactory(okhttp3.Call.Factory callFactory)
Please also add a AuthorizationHeaderInterceptor ContentTypeInterceptor if
you are using a custom call factory to ensure properly setup http headers.
callFactory - Call.Factory instanceBuilder instancepublic CMAClient.Builder setUploadCallFactory(okhttp3.Call.Factory callFactory)
callFactory - Call.Factory instanceBuilder instanceCall.Factory for needed interceptors.public CMAClient.Builder setCallbackExecutor(Executor executor)
executor - Executor on which any CMACallback methods will be invoked. This
defaults to execute on the main thread for Android projects. For non-Android
projects this defaults to the same thread of the HTTP client.Builder instancepublic CMAClient.Builder setLogger(Logger logger)
logger - LoggerBuilder instancepublic CMAClient.Builder setLogLevel(Logger.Level logLevel)
logLevel - Logger.Level valueBuilder instancepublic CMAClient build()
CMAClient out of this CMAClient.Builder.public okhttp3.OkHttpClient.Builder defaultCoreCallFactoryBuilder()
public okhttp3.OkHttpClient.Builder defaultUploadCallFactoryBuilder()
Copyright © 2017 Contentful, GmbH.. All Rights Reserved.