public final class SyncSession extends Object
SessionState
SyncConfiguration
.
A Session is created by either calling SyncManager.getSession(SyncConfiguration)
or by opening
a Realm instance using that configuration. Once a session has been created, it will continue to exist until the app
is closed or the SyncConfiguration
is no longer used.
A session is fully controlled by Realm, but can provide additional information in case of errors.
It is passed along in all SyncSession.ErrorHandler
s.
This object is thread safe.
Modifier and Type | Class and Description |
---|---|
static interface |
SyncSession.ErrorHandler
Interface used to report any session errors.
|
Modifier and Type | Method and Description |
---|---|
SyncConfiguration |
getConfiguration()
Returns the
SyncConfiguration that is responsible for controlling the session. |
URI |
getServerUrl()
Returns the
URI describing the remote Realm which this session connects to and synchronizes changes with. |
SessionState |
getState()
Returns the state of this session.
|
SyncUser |
getUser()
Returns the
SyncUser defined by the SyncConfiguration that is used to connect to the
Realm Object Server. |
public SyncConfiguration getConfiguration()
SyncConfiguration
that is responsible for controlling the session.public SyncUser getUser()
SyncUser
defined by the SyncConfiguration
that is used to connect to the
Realm Object Server.SyncUser
used to authenticate the session on the Realm Object Server.public URI getServerUrl()
URI
describing the remote Realm which this session connects to and synchronizes changes with.URI
describing the remote Realm.public SessionState getState()
SessionState
for this session.