Class AppConfiguration.Builder
On this page
- io.realm.mongodb
- Constructors
- Method Summary
- Inherited Methods
- Constructor Detail
- Method Detail
- addCustomRequestHeader
- addCustomRequestHeaders
- appName
- appVersion
- authorizationHeaderName
- baseUrl
- build
- codecRegistry
- defaultClientResetHandler
- defaultSyncClientResetStrategy
- defaultSyncErrorHandler
- encryptionKey
- httpLogObfuscator
- requestTimeout
- syncRootDirectory
io.realm.mongodb
Enclosing class:
Builder used to construct instances of a AppConfiguration in a fluent manner.
Constructors
Method Summary
Modifier and Type | Method and Description |
---|---|
public AppConfiguration.Builder | Adds an extra HTTP header to append to every request to a Realm Object Server. |
public AppConfiguration.Builder | Adds extra HTTP headers to append to every request to a Realm Object Server. |
public AppConfiguration.Builder | |
public AppConfiguration.Builder | Sets the apps version. |
public AppConfiguration.Builder | Sets the name of the HTTP header used to send authorization data in when making requests to MongoDB Realm. |
public AppConfiguration.Builder | |
public AppConfiguration | build () Creates the AppConfiguration. |
public AppConfiguration.Builder | Set the default codec registry used to encode and decode BSON arguments and results when calling remote Realm io.realm.mongodb.functions.Functions and accessing a remote io.realm.mongodb.mongo.MongoDatabase . |
public AppConfiguration.Builder | Sets the default Client Reset handler used by Synced Realms when they report a Client Reset. |
public AppConfiguration.Builder | Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. |
public AppConfiguration.Builder | Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. |
public AppConfiguration.Builder | Sets the default error handler used by Synced Realms when reporting errors with their session. |
public AppConfiguration.Builder | Sets the encryption key used to encrypt user meta data only. |
public AppConfiguration.Builder | Sets the HttpLogObfuscator used to keep sensitive information in HTTP requests from being displayed in the logcat. |
public AppConfiguration.Builder | Sets the default timeout used by network requests against the MongoDB Realm application. |
public AppConfiguration.Builder | Configures the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass
,hashCode
,equals
,clone
,toString
,notify
,notifyAll
,wait
,wait
,wait
,finalize
Constructor Detail
Method Detail
addCustomRequestHeader
Adds an extra HTTP header to append to every request to a Realm Object Server. Parameters
Throws
|
addCustomRequestHeaders
Adds extra HTTP headers to append to every request to a Realm Object Server. Parameters
Throws
|
appName
Sets the apps name. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application. Parameters
|
appVersion
Sets the apps version. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application. Parameters
|
authorizationHeaderName
Sets the name of the HTTP header used to send authorization data in when making requests to MongoDB Realm. The MongoDB server or firewall must have been configured to expect a custom authorization header.The default authorization header is named DEFAULT_AUTHORIZATION_HEADER_NAME. Parameters
Throws
|
baseUrl
Sets the base url for the MongoDB Realm Application. The default value is DEFAULT_BASE_URL. Parameters
|
build
public AppConfiguration build () |
---|
codecRegistry
Set the default codec registry used to encode and decode BSON arguments and results when calling remote Realm io.realm.mongodb.functions.Functions and accessing a remote io.realm.mongodb.mongo.MongoDatabase . Will default to DEFAULT_BSON_CODEC_REGISTRY if not specified. Parameters
TipSee also:
|
defaultClientResetHandler
Sets the default Client Reset handler used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling io.realm.mongodb.sync.SyncConfiguration.Builder.clientResetHandler(SyncSession.ClientResetHandler) when creating the io.realm.mongodb.sync.SyncConfiguration . Parameters
|
defaultSyncClientResetStrategy
Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) or io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) when creating the io.realm.mongodb.sync.SyncConfiguration . Parameters
|
Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) or io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) when creating the io.realm.mongodb.sync.SyncConfiguration . Parameters
|
defaultSyncErrorHandler
Sets the default error handler used by Synced Realms when reporting errors with their session.This default can be overridden by calling io.realm.mongodb.sync.SyncConfiguration.Builder.errorHandler(SyncSession.ErrorHandler) when creating the io.realm.mongodb.sync.SyncConfiguration . Parameters
|
encryptionKey
Sets the encryption key used to encrypt user meta data only. Individual Realms needs to use io.realm.mongodb.sync.SyncConfiguration.Builder.encryptionKey(byte[]) to make them encrypted. Parameters
Throws
|
httpLogObfuscator
Sets the HttpLogObfuscator used to keep sensitive information in HTTP requests from being displayed in the logcat. If left unspecified, it will default to obfuscating HTTP login requests. Parameters
|
requestTimeout
Sets the default timeout used by network requests against the MongoDB Realm application. Requests will terminate with a failure if they exceed this limit. The default value is AppConfiguration.DEFAULT_REQUEST_TIMEOUT seconds. Parameters
|
syncRootDirectory
Configures the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm.The default root dir is Parameters
|