Package com.parse

Class Parse.Configuration.Builder

  • Enclosing class:
    Parse.Configuration

    public static final class Parse.Configuration.Builder
    extends java.lang.Object
    Allows for simple constructing of a Configuration object.
    • Constructor Detail

      • Builder

        public Builder​(Context context)
        Initialize a bulider with a given context.

        This context will then be passed through to the rest of the Parse SDK for use during initialization.

        Parameters:
        context - The active Context for your application. Cannot be null.
    • 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 the okhttp3.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 concrete Configuration instance.
        Returns:
        A constructed Configuration object.