Class AppConfiguration
On this page
- io.realm.mongodb
- Nested Class Summary
- Field Summary
- Method Summary
- Inherited Methods
- Field Detail
DEFAULT_AUTHORIZATION_HEADER_NAME
DEFAULT_BASE_URL
DEFAULT_BSON_CODEC_REGISTRY
DEFAULT_REQUEST_TIMEOUT
loginObfuscators
- Method Detail
- equals
- getAppId
- getAppName
- getAppVersion
- getAuthorizationHeaderName
- getBaseUrl
- getCustomRequestHeaders
- getDefaultClientResetHandler
- getDefaultCodecRegistry
- getDefaultErrorHandler
- getDefaultSyncClientResetStrategy
- getEncryptionKey
- getHttpLogObfuscator
- getRequestTimeoutMs
- getSyncRootDirectory
- hashCode
io.realm.mongodb
An AppConfiguration is used to setup a MongoDB Realm application.Instances of an AppConfiguration can only created by using the AppConfiguration.Builder and calling its AppConfiguration.Builder.build() method.
Configuring an App is only required if the default settings are not enough. Otherwise calling new App("app-id")
is sufficient.
Nested Class Summary
Modifier and Type | Class and Description |
---|---|
public static |
Field Summary
Modifier and Type | Field and Description |
---|---|
public static final String | DEFAULT_AUTHORIZATION_HEADER_NAME The default header name used to carry authorization data when making network requests towards MongoDB Realm. |
public static final String | The default url for MongoDB Realm applications. |
public static final CodecRegistry | Default BSON codec registry for encoding/decoding arguments and results to/from MongoDB App Services backend.This will encode/decode most primitive types, list and map types and BsonValues. |
public static final long | The default request timeout for network requests towards MongoDB Realm in seconds. |
public static final Map | Default obfuscators for login requests used in a MongoDB Realm app.This map is needed to instantiate the default HttpLogObfuscator , which will keep all login-sensitive information from being shown in Logcat. This map's keys represent the different login identity providers which can be used to authenticate against an app and the values are the concrete obfuscators used for that provider. |
Method Summary
Modifier and Type | Method and Description |
---|---|
public boolean | |
public String | getAppId () Returns the unique app id that identities the Realm application. |
public String | getAppName () Returns the name used to describe the Realm application. |
public String | Returns the version of this Realm application. |
public String | Returns the name of the header used to carry authentication data when making network requests towards MongoDB Realm. |
public URL | getBaseUrl () Returns the base url for this Realm application. |
public Map | Returns any custom configured headers that will be sent alongside other headers when making network requests towards MongoDB Realm. |
Returns the default Client Reset handler used by synced Realms if there are problems with their SyncSession . | |
public CodecRegistry | Returns 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 SyncSession.ErrorHandler | Returns the default error handler used by synced Realms if there are problems with their SyncSession . |
public SyncClientResetStrategy | Returns the default sync client reset strategy used by synced Realms if there are problems with their SyncSession . |
public byte | Returns the encryption key, if any, that is used to encrypt Realm users meta data on this device. |
public HttpLogObfuscator | Returns the HttpLogObfuscator used in the app, which keeps sensitive information in HTTP requests from being displayed in the logcat. |
public long | Returns the default timeout for network requests against the Realm application in milliseconds. |
public File | Returns the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. |
public int | hashCode () |
Inherited Methods
Methods inherited from class java.lang.Object :
getClass
,hashCode
,equals
,clone
,toString
,notify
,notifyAll
,wait
,wait
,wait
,finalize
Field Detail
DEFAULT_AUTHORIZATION_HEADER_NAME
The default header name used to carry authorization data when making network requests towards MongoDB Realm.
DEFAULT_BASE_URL
The default url for MongoDB Realm applications.
DEFAULT_BSON_CODEC_REGISTRY
Default BSON codec registry for encoding/decoding arguments and results to/from MongoDB App Services backend.This will encode/decode most primitive types, list and map types and BsonValues.
Tip
See also:
ValueCodecProvider
BsonValueCodecProvider
IterableCodecProvider
MapCodecProvider
DocumentCodecProvider
DEFAULT_REQUEST_TIMEOUT
The default request timeout for network requests towards MongoDB Realm in seconds.
loginObfuscators
Default obfuscators for login requests used in a MongoDB Realm app.This map is needed to instantiate the default HttpLogObfuscator , which will keep all login-sensitive information from being shown in Logcat.
This map's keys represent the different login identity providers which can be used to authenticate against an app and the values are the concrete obfuscators used for that provider.
Tip
See also:
RegexPatternObfuscator
ApiKeyObfuscator
TokenObfuscator
CustomFunctionObfuscator
EmailPasswordObfuscator
Method Detail
equals
getAppId
getAppName
public String getAppName () |
---|
Returns the name used to describe the Realm application. This is only used as debug information. Returns the app name. |
getAppVersion
public String getAppVersion () |
---|
Returns the version of this Realm application. This is only used as debug information. Returns the app version. |
getAuthorizationHeaderName
public String getAuthorizationHeaderName () |
---|
Returns the name of the header used to carry authentication data when making network requests towards MongoDB Realm. Returns the authentication header name. |
getBaseUrl
public URL getBaseUrl () |
---|
Returns the base url for this Realm application. Returns the app base url. |
getCustomRequestHeaders
public Map getCustomRequestHeaders () |
---|
Returns any custom configured headers that will be sent alongside other headers when making network requests towards MongoDB Realm. Returns a |
getDefaultClientResetHandler
Returns the default Client Reset handler used by synced Realms if there are problems with their SyncSession . Returns the app default error handler. |
getDefaultCodecRegistry
public CodecRegistry getDefaultCodecRegistry () |
---|
Returns 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 . Returns The default codec registry for the App. |
getDefaultErrorHandler
Returns the default error handler used by synced Realms if there are problems with their SyncSession . Returns the app default error handler. |
getDefaultSyncClientResetStrategy
Returns the default sync client reset strategy used by synced Realms if there are problems with their SyncSession . Returns the app default error handler. |
getEncryptionKey
public byte getEncryptionKey () |
---|
Returns the encryption key, if any, that is used to encrypt Realm users meta data on this device. If no key is returned, the data is not encrypted. Returns the encryption key if exists, or |
getHttpLogObfuscator
public HttpLogObfuscator getHttpLogObfuscator () |
---|
Returns the HttpLogObfuscator used in the app, which keeps sensitive information in HTTP requests from being displayed in the logcat. Returns the HTTP log obfuscator. |
getRequestTimeoutMs
public long getRequestTimeoutMs () |
---|
Returns the default timeout for network requests against the Realm application in milliseconds. Returns the default timeout for network requests in milliseconds. |
getSyncRootDirectory
public File getSyncRootDirectory () |
---|
Returns the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. Returns the sync root directory. |