Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/ /
io.realm.mongodb

Class AppConfiguration.Builder

java.lang.Object
io.realm.mongodb.AppConfiguration.Builder

Enclosing class:

AppConfiguration

Constructor utilizado para crear instancias de una AppConfiguration de manera fluida.

Constructor and Description
String appId
)

Crea una instancia del Constructor para la AppConfiguration.

Modificador y Tipo
Método y descripción
String headerName,
String headerValue
)

Adds an extra HTTP header to append to every request to a Realm Object Server.

Agrega cabeceras HTTP extra a cada solicitud hacia un objeto Realm servidor.

String appName
)

Establece el nombre de la aplicación.

String appVersion
)

Sets the apps version.

Establece el nombre del encabezado HTTP utilizado para enviar datos de autorización al realizar solicitudes a MongoDB Realm.

String baseUrl
)

Establece la URL base para la aplicación MongoDB Realm.

Creates the AppConfiguration.

CodecRegistry 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 .

Establece el controlador de restablecimiento de cliente predeterminado que utilizan Synced Realms cuando informan un restablecimiento de cliente.

Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset.

Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset.

Establece el controlador de errores predeterminado que utiliza Synced Realms al informar errores con su sesión.

byte[] key
)

Sets the encryption key used to encrypt user meta data only.

Establece el HttpLogObfuscator utilizado para evitar que la información sensible en las solicitudes HTTP se muestre en el logcat.

long time,
)

Establece el tiempo de espera por defecto utilizado por las solicitudes de red a la aplicación MongoDB Realm.

Configures the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm.

  • Métodos heredados de la clase java.lang.Object: getClass , hashCode , equals , clone , toString , notify , notifyAll , wait , wait , wait , finalize

public Builder (
String appId
)

Crea una instancia del Constructor para la AppConfiguration.

Parámetros

  • appId - the application id of the MongoDB Realm Application.

Adds an extra HTTP header to append to every request to a Realm Object Server.

Parámetros

  • headerName - the name of the header.

  • headerValue - el valor del encabezado.

Throws

Agrega cabeceras HTTP extra a cada solicitud hacia un objeto Realm servidor.

Parámetros

  • headers - mapa de pares (headerName, headerValue).

Throws

Sets the apps name. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application.

Parámetros

  • appName - app name used to identify the application.

Sets the apps version. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application.

Parámetros

  • appVersion - app version used to identify the application.

Establece el nombre del encabezado HTTP utilizado para enviar datos de autorización al realizar solicitudes a MongoDB Realm. El servidor MongoDB o el firewall se debe haber configurado para esperar un encabezado de autorización personalizado.El encabezado de autorización por defecto se llama DEFAULT_AUTHORIZATION_HEADER_NAME.

Parámetros

  • headerName - nombre del encabezado.

Throws

Establece la URL base para la aplicación MongoDB Realm. El valor predeterminado es DEFAULT_BASE_URL.

Parámetros

  • baseUrl - la URL base para la aplicación MongoDB Realm.

Creates the AppConfiguration.

Devuelve

la AppConfiguration que se puede utilizar para crear una aplicación.

CodecRegistry 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 .

El valor predeterminado será DEFAULT_BSON_CODEC_REGISTRY si no se especifica.

Parámetros

  • codecRegistry - The default codec registry for the App.

Tip

  • DEFAULT_BSON_CODEC_REGISTRY

  • Constructor.getDefaultCodecRegistry()

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 .

Parámetros

  • handler - the default Client Reset handler.

Establece la estrategia de restablecimiento del cliente de sincronización predeterminada utilizada por Synced Realms cuando informan un restablecimiento del cliente. Esta sesión predeterminada se puede anular llamando a io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) o io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) al crear io.realm.mongodb.sync.SyncConfiguration.

Parámetros

  • strategy - the default sync client reset strategy.

Establece la estrategia de restablecimiento del cliente de sincronización predeterminada utilizada por Synced Realms cuando informan un restablecimiento del cliente. Esta sesión predeterminada se puede anular llamando a io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) o io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) al crear io.realm.mongodb.sync.SyncConfiguration.

Parámetros

  • strategy - the default sync client reset strategy.

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 .

Parámetros

  • errorHandler - the default error handler.

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.

Parámetros

  • key - una clave de cifrado de 64 bytes.

Throws

Establece el HttpLogObfuscator utilizado para evitar que la información sensible en las solicitudes HTTP se muestre en el logcat.

Si no se especifica, se ofuscarán las solicitudes de inicio de sesión HTTP por defecto.

Parámetros

  • httpLogObfuscator - el ofuscador de registro HTTP predeterminado para la aplicación.

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.

Parámetros

  • time - the timeout value for network requests.

  • unit - la unidad de tiempo utilizada para definir el tiempo de espera.

Configura la carpeta raíz que contiene todos los archivos y reinos utilizados al sincronizar datos entre el dispositivo y MongoDB Realm. El directorio raíz predeterminado es Context.getFilesDir()/mongodb-realm .

Parámetros

  • rootDir - dónde almacenar los archivos relacionados con la sincronización.

Volver

AppConfiguration

En esta página