Class CoreRemoteMongoClientImpl
- java.lang.Object
-
- com.mongodb.stitch.core.services.mongodb.remote.internal.CoreRemoteMongoClientImpl
-
- All Implemented Interfaces:
StitchServiceBinder
,CoreRemoteMongoClient
,Closeable
,AutoCloseable
public class CoreRemoteMongoClientImpl extends Object implements CoreRemoteMongoClient, StitchServiceBinder
-
-
Constructor Summary
Constructors Constructor Description CoreRemoteMongoClientImpl(CoreStitchServiceClient service, String instanceKey, StitchAppClientInfo appInfo, EmbeddedMongoClientFactory clientFactory)
-
Method Summary
Modifier and Type Method Description void
close()
CoreRemoteMongoDatabaseImpl
getDatabase(String databaseName)
Gets aCoreRemoteMongoDatabaseImpl
instance for the given database name.DataSynchronizer
getDataSynchronizer()
void
onRebindEvent(RebindEvent rebindEvent)
Notify the binder that a rebind event has occured.
-
-
-
Constructor Detail
-
CoreRemoteMongoClientImpl
public CoreRemoteMongoClientImpl(CoreStitchServiceClient service, String instanceKey, StitchAppClientInfo appInfo, @Nullable EmbeddedMongoClientFactory clientFactory)
-
-
Method Detail
-
onRebindEvent
public void onRebindEvent(RebindEvent rebindEvent)
Description copied from interface:StitchServiceBinder
Notify the binder that a rebind event has occured. E.g., a change in authentication.- Specified by:
onRebindEvent
in interfaceStitchServiceBinder
- Parameters:
rebindEvent
- the rebind event that occurred
-
getDatabase
public CoreRemoteMongoDatabaseImpl getDatabase(String databaseName)
Gets aCoreRemoteMongoDatabaseImpl
instance for the given database name.- Specified by:
getDatabase
in interfaceCoreRemoteMongoClient
- Parameters:
databaseName
- the name of the database to retrieve- Returns:
- a
CoreRemoteMongoDatabaseImpl
representing the specified database
-
getDataSynchronizer
public DataSynchronizer getDataSynchronizer()
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-
-