public class AppConfiguration extends Object
Instances of a AppConfiguration can only created by using the
AppConfiguration.Builder
and calling its
AppConfiguration.Builder.build()
method.
Configuring a App is only required if the default settings are not enough. Otherwise calling
new App("app-id")
is sufficient.
Modifier and Type | Class and Description |
---|---|
static class |
AppConfiguration.Builder
Builder used to construct instances of a
AppConfiguration in a fluent manner. |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_AUTHORIZATION_HEADER_NAME
The default header name used to carry authorization data when making network requests
towards MongoDB Realm.
|
static String |
DEFAULT_BASE_URL
The default url for MongoDB Realm applications.
|
static CodecRegistry |
DEFAULT_BSON_CODEC_REGISTRY
Default BSON codec registry for encoding/decoding arguments and results to/from MongoDB Realm backend.
|
static long |
DEFAULT_REQUEST_TIMEOUT
The default request timeout for network requests towards MongoDB Realm in seconds.
|
Modifier and Type | Method and Description |
---|---|
String |
getAppId()
Returns the unique app id that identities the Realm application.
|
String |
getAppName()
Returns the name used to describe the Realm application.
|
String |
getAppVersion()
Returns the version of this Realm application.
|
String |
getAuthorizationHeaderName()
Returns the name of the header used to carry authentication data when making network
requests towards MongoDB Realm.
|
URL |
getBaseUrl()
Returns the base url for this Realm application.
|
Map<String,String> |
getCustomRequestHeaders()
Returns any custom configured headers that will be sent alongside other headers when
making network requests towards MongoDB Realm.
|
CodecRegistry |
getDefaultCodecRegistry()
Returns the default codec registry used to encode and decode BSON arguments and results when
calling remote Realm
Functions and accessing a remote
MongoDatabase . |
SyncSession.ErrorHandler |
getDefaultErrorHandler()
Returns the default error handler used by synced Realms if there are problems with their
SyncSession . |
byte[] |
getEncryptionKey()
Returns the encryption key, if any, that is used to encrypt Realm users meta data on this
device.
|
long |
getRequestTimeoutMs()
Returns the default timeout for network requests against the Realm application in
milliseconds.
|
File |
getSyncRootDirectory()
Returns the root folder containing all files and Realms used when synchronizing data
between the device and MongoDB Realm.
|
public static final String DEFAULT_BASE_URL
public static final long DEFAULT_REQUEST_TIMEOUT
public static final String DEFAULT_AUTHORIZATION_HEADER_NAME
public static final CodecRegistry DEFAULT_BSON_CODEC_REGISTRY
This will encode/decode most primitive types, list and map types and BsonValues.
getDefaultCodecRegistry()
,
AppConfiguration.Builder.codecRegistry(CodecRegistry)
,
ValueCodecProvider
,
BsonValueCodecProvider
,
IterableCodecProvider
,
MapCodecProvider
,
DocumentCodecProvider
public String getAppId()
public String getAppName()
public String getAppVersion()
public URL getBaseUrl()
public byte[] getEncryptionKey()
public long getRequestTimeoutMs()
public String getAuthorizationHeaderName()
public Map<String,String> getCustomRequestHeaders()
public SyncSession.ErrorHandler getDefaultErrorHandler()
SyncSession
.public File getSyncRootDirectory()
public CodecRegistry getDefaultCodecRegistry()
Functions
and accessing a remote
MongoDatabase
.DEFAULT_BSON_CODEC_REGISTRY
,
getDefaultCodecRegistry()