Class DbxRequestConfig.Builder
- java.lang.Object
- 
- com.dropbox.core.DbxRequestConfig.Builder
 
- 
- Enclosing class:
- DbxRequestConfig
 
 public static final class DbxRequestConfig.Builder extends java.lang.ObjectBuilder forDbxRequestConfig.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DbxRequestConfigbuild()Builds an instance ofDbxRequestConfigwith this builder's configured parameters or defaults.DbxRequestConfig.BuilderwithAutoRetryDisabled()Disables automatic retry of RPC and download requests that fail with aRetryException.DbxRequestConfig.BuilderwithAutoRetryEnabled()Enables automatic retry of RPC and download requests that fail with aRetryException.DbxRequestConfig.BuilderwithAutoRetryEnabled(int maxRetries)Enables automatic retry of RPC and download requests that fail with aRetryException.DbxRequestConfig.BuilderwithHttpRequestor(HttpRequestor httpRequestor)Set the HTTP requestor to use for issuing network requests to the Dropbox servers.DbxRequestConfig.BuilderwithUserLocale(java.lang.String userLocale)Set the locale of the app user.DbxRequestConfig.BuilderwithUserLocaleFrom(java.util.Locale userLocale)Set the locale of the app user.DbxRequestConfig.BuilderwithUserLocaleFromPreferences()Set the locale of user-visible messages returned by the Dropbox servers to the user's Dropbox locale.
 
- 
- 
- 
Method Detail- 
withUserLocalepublic DbxRequestConfig.Builder withUserLocale(java.lang.String userLocale) Set the locale of the app user. User-visible messages returned by the Dropbox servers will be localized to this locale.Defaults to null, which means strings will be localized according to the user's Dropbox locale preference.- Parameters:
- userLocale- locale of app user as an IETF BCP 47 language tag, or- nullto use the user's Dropbox locale settings.
- Returns:
- this builder
 
 - 
withUserLocaleFromPreferencespublic DbxRequestConfig.Builder withUserLocaleFromPreferences() Set the locale of user-visible messages returned by the Dropbox servers to the user's Dropbox locale.User-visible strings will be localized according to the user's Dropbox locale preference. - Returns:
- this builder
 
 - 
withUserLocaleFrompublic DbxRequestConfig.Builder withUserLocaleFrom(java.util.Locale userLocale) Set the locale of the app user. User-visible messages returned by the Dropbox servers will be localized to this locale.Defaults to null, which means strings will be localized according to the user's Dropbox locale preference.- Parameters:
- userLocale- Locale of app user, or- nullto use user's Dropbox locale settings.
- Returns:
- this builder
 
 - 
withHttpRequestorpublic DbxRequestConfig.Builder withHttpRequestor(HttpRequestor httpRequestor) Set the HTTP requestor to use for issuing network requests to the Dropbox servers.Defaults to StandardHttpRequestor.INSTANCE.- Parameters:
- httpRequestor- HTTP requestor to use for network requests, never- null
- Returns:
- this builder
 
 - 
withAutoRetryEnabledpublic DbxRequestConfig.Builder withAutoRetryEnabled() Enables automatic retry of RPC and download requests that fail with aRetryException.The default number of 3retries will be used in addition to the initial request. To specify the maximum number of retries, seewithAutoRetryEnabled(int).By default, the client will not automatically retry any requests. - Returns:
- this builder
 
 - 
withAutoRetryDisabledpublic DbxRequestConfig.Builder withAutoRetryDisabled() Disables automatic retry of RPC and download requests that fail with aRetryException.By default, the client will not automatically retry any requests. - Returns:
- this builder
- See Also:
- withAutoRetryEnabled()
 
 - 
withAutoRetryEnabledpublic DbxRequestConfig.Builder withAutoRetryEnabled(int maxRetries) Enables automatic retry of RPC and download requests that fail with aRetryException.The client will retry failed requests a maximum of maxRetriestimes before propogating the exception. Note thatmaxRetriesdoes not count the initial request attempt. For example, ifmaxRetriesis 3, the client may issue a request a total of 4 times: once for the initial call, then 3 additional times for the 3 retries.By default, the client will not automatically retry any requests. To enable automatic retries with the default maximum number of attempts, use withAutoRetryEnabled().- Parameters:
- maxRetries- maximum number of times to retry a retriable failed request. Must be positive.
- Returns:
- this builder
- Throws:
- java.lang.IllegalArgumentException- if- maxRetriesis not positive.
 
 - 
buildpublic DbxRequestConfig build() Builds an instance ofDbxRequestConfigwith this builder's configured parameters or defaults.- Returns:
- new DbxRequestConfiginstance.
 
 
- 
 
-