Class StitchClientConfiguration.Builder

    • Constructor Detail

      • Builder

        public Builder()
        Constructs a new builder.
    • Method Detail

      • withBaseUrl

        public StitchClientConfiguration.Builder withBaseUrl​(String baseUrl)
        Sets the base URL of the Stitch server that the client will communicate with.
        Parameters:
        baseUrl - the base URL of the Stitch server that the client will communicate with.
        Returns:
        the builder.
      • withStorage

        public StitchClientConfiguration.Builder withStorage​(Storage storage)
        Sets the underlying storage to persist client specific data to.
        Parameters:
        storage - the underlying storage to persist client specific data to.
        Returns:
        the builder.
      • withDataDirectory

        public StitchClientConfiguration.Builder withDataDirectory​(String dataDirectory)
        Sets the local directory in which Stitch can store any data (e.g. embedded MongoDB data directory).
        Parameters:
        dataDirectory - the local directory in which Stitch can store any data.
        Returns:
        the builder.
      • withTransport

        public StitchClientConfiguration.Builder withTransport​(Transport transport)
        Sets the Transport that the client will use to make round trips to the Stitch server.
        Parameters:
        transport - the Transport that the client will use to make round trips to the Stitch server.
        Returns:
        the builder.
      • withDefaultRequestTimeout

        public StitchClientConfiguration.Builder withDefaultRequestTimeout​(Long defaultRequestTimeout)
        Sets the number of milliseconds that a `Transport` should spend by default on an HTTP round trip before failing with an error. Important: If a request timeout was specified for a specific operation, for example in a function call, that timeout will override this one.
        Parameters:
        defaultRequestTimeout - the number of milliseconds that a `Transport` should spend by default on an HTTP round trip before failing with an error.
        Returns:
        the builder.
      • withCodecRegistry

        public StitchClientConfiguration.Builder withCodecRegistry​(CodecRegistry codecRegistry)
        Merges the provided codec registry with the default codec registry.
        Parameters:
        codecRegistry - the codec registry to merge with the default registry.
        Returns:
        the builder.
      • getBaseUrl

        public String getBaseUrl()
        Gets the base URL of the Stitch server that the client will communicate with.
        Returns:
        the base URL of the Stitch server that the client will communicate with.
      • getDataDirectory

        public String getDataDirectory()
        Gets the local directory in which Stitch can store any data (e.g. embedded MongoDB data directory).
        Returns:
        the local directory in which Stitch can store any data.
      • getStorage

        public Storage getStorage()
        Gets the underlying storage to persist client specific data to.
        Returns:
        the underlying storage to persist client specific data to.
      • getTransport

        public Transport getTransport()
        Gets the Transport that the client will use to make round trips to the Stitch server.
        Returns:
        the Transport that the client will use to make round trips to the Stitch server.
      • getDefaultRequestTimeout

        public Long getDefaultRequestTimeout()
        Gets the number of milliseconds that a `Transport` should spend by default on an HTTP round trip before failing with an error. Important: If a request timeout was specified for a specific operation, for example in a function call, that timeout will override this one.
        Returns:
        the number of milliseconds that a `Transport` should spend by default on an HTTP round trip before failing with an error.
      • getCodecRegistry

        public CodecRegistry getCodecRegistry()
        Gets the codec registry used to encode/decode JSON.
        Returns:
        the codec registry used to encode/decode JSON.
      • getNetworkMonitor

        public NetworkMonitor getNetworkMonitor()
        Gets the NetworkMonitor that the client will used to check internet status.
        Returns:
        the NetworkMonitor that the client will used to check internet status.