Builder

class Builder(appId: String)

Builder used to construct instances of an AppConfiguration in a fluent manner.

Parameters

appId

the application id of the App Services Application.

Constructors

Link copied to clipboard
constructor(appId: String)

Functions

Link copied to clipboard

Sets the debug app name which is added to debug headers for App Services network requests. The default is null.

Link copied to clipboard

Sets the debug app version which is added to debug headers for App Services network requests. The default is null

Link copied to clipboard

Sets the name of the HTTP header used to send authorization data in when making requests to Atlas App Services. The Atlas App or firewall must have been configured to expect a custom authorization header.

Link copied to clipboard

Sets the base url for the App Services Application. The default value is DEFAULT_BASE_URL.

Link copied to clipboard

Creates the AppConfiguration from the properties of the builder.

fun build(bundleId: String): AppConfiguration
Link copied to clipboard

Update the custom headers that would be appended to every request to an Atlas App Services Application.

Link copied to clipboard
fun dispatcher(dispatcher: CoroutineDispatcher): AppConfiguration.Builder

The dispatcher used to execute internal tasks; most notably remote HTTP requests.

Link copied to clipboard

Sets the default EJson decoder that would be use to encode and decode arguments and results when calling remote Atlas Functions, authenticating with a customFunction, and retrieving a user profile or customData.

Link copied to clipboard

If enabled, a single connection is used for all Realms opened with a single sync user. If disabled, a separate connection is used for each Realm.

Link copied to clipboard

Sets the encryption key used to encrypt the user metadata Realm only. Individual Realms need to use SyncConfiguration.Builder.encryptionKey to encrypt them.

Link copied to clipboard

Sets the a HttpLogObfuscator used to keep sensitive information in HTTP requests from being displayed in the log. Logs containing tokens, passwords or custom function arguments and the result of computing these will be obfuscated by default. Logs will not be obfuscated if the value is set to null.

Link copied to clipboard

Configures the root folder that marks the location of a mongodb-realm folder. This folder contains all files and realms used when synchronizing data between the device and Atlas using Device Sync.

Link copied to clipboard

Configure the assorted types of connection timeouts for sync connections. See SyncTimeoutOptionsBuilder for a description of each option.

Link copied to clipboard

Platform Networking offer improved support for proxies and firewalls that require authentication, instead of Realm's built-in WebSocket client for Sync traffic. This will become the default in a future version.