Package com.parse
Class Parse.Configuration.Builder
- java.lang.Object
-
- com.parse.Parse.Configuration.Builder
-
- Enclosing class:
- Parse.Configuration
public static final class Parse.Configuration.Builder extends java.lang.Object
Allows for simple constructing of aConfiguration
object.
-
-
Constructor Summary
Constructors Constructor Description Builder(Context context)
Initialize a bulider with a given context.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Parse.Configuration.Builder
allowCustomObjectId()
Allow to set a custom objectId for ParseObjects.Parse.Configuration.Builder
applicationId(java.lang.String applicationId)
Set the application id to be used by Parse.Parse.Configuration
build()
Construct this builder into a concreteConfiguration
instance.Parse.Configuration.Builder
clientBuilder(OkHttpClient.Builder builder)
Set theokhttp3.OkHttpClient.Builder
to use when communicating with the Parse REST APIParse.Configuration.Builder
clientKey(java.lang.String clientKey)
Set the client key to be used by Parse.Parse.Configuration.Builder
enableLocalDataStore()
Enable pinning in your application.Parse.Configuration.Builder
maxRetries(int maxRetries)
Set the max number of times to retry Parse operations before deeming them a failureParse.Configuration.Builder
server(java.lang.String server)
Set the server URL to be used by Parse.
-
-
-
Method Detail
-
applicationId
public Parse.Configuration.Builder applicationId(java.lang.String applicationId)
Set the application id to be used by Parse.- Parameters:
applicationId
- The application id to set.- Returns:
- The same builder, for easy chaining.
-
clientKey
public Parse.Configuration.Builder clientKey(java.lang.String clientKey)
Set the client key to be used by Parse.- Parameters:
clientKey
- The client key to set.- Returns:
- The same builder, for easy chaining.
-
server
public Parse.Configuration.Builder server(java.lang.String server)
Set the server URL to be used by Parse.- Parameters:
server
- The server URL to set.- Returns:
- The same builder, for easy chaining.
-
enableLocalDataStore
public Parse.Configuration.Builder enableLocalDataStore()
Enable pinning in your application. This must be called before your application can use pinning.- Returns:
- The same builder, for easy chaining.
-
allowCustomObjectId
public Parse.Configuration.Builder allowCustomObjectId()
Allow to set a custom objectId for ParseObjects.- Returns:
- The same builder, for easy chaining.
-
clientBuilder
public Parse.Configuration.Builder clientBuilder(OkHttpClient.Builder builder)
Set theokhttp3.OkHttpClient.Builder
to use when communicating with the Parse REST API- Parameters:
builder
- The client builder, which will be modified for compatibility- Returns:
- The same builder, for easy chaining.
-
maxRetries
public Parse.Configuration.Builder maxRetries(int maxRetries)
Set the max number of times to retry Parse operations before deeming them a failure- Parameters:
maxRetries
- The maximum number of times to retry. <=0 to never retry commands- Returns:
- The same builder, for easy chaining.
-
build
public Parse.Configuration build()
Construct this builder into a concreteConfiguration
instance.- Returns:
- A constructed
Configuration
object.
-
-