| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
CMAClient |
build()
Returns a
CMAClient out of this CMAClient.Builder. |
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 |
setClient(retrofit.client.Client client)
Sets a custom HTTP client.
|
CMAClient.Builder |
setClientProvider(retrofit.client.Client.Provider clientProvider)
Sets a custom HTTP client provider.
|
CMAClient.Builder |
setEndpoint(String remoteUrl)
Overrides the default remote URL.
|
CMAClient.Builder |
setLogLevel(retrofit.RestAdapter.LogLevel logLevel)
Sets the log level for this client.
|
public CMAClient.Builder setEndpoint(String remoteUrl)
remoteUrl - String representing the remote URLCMAClient.Builder instancepublic CMAClient.Builder setAccessToken(String accessToken)
accessToken - access tokenCMAClient.Builder instancepublic CMAClient.Builder setClient(retrofit.client.Client client)
client - ClientCMAClient.Builder instancepublic CMAClient.Builder setClientProvider(retrofit.client.Client.Provider clientProvider)
clientProvider - Client.Provider instanceBuilder instancepublic 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 setLogLevel(retrofit.RestAdapter.LogLevel logLevel)
logLevel - RestAdapter.LogLevel valueBuilder instancepublic CMAClient build()
CMAClient out of this CMAClient.Builder.Copyright © 2014 Contentful, GmbH.. All rights reserved.