public abstract class AuthenticatingMongoTemplate extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String userName,
char[] password)
Initializes the MongoTemplate to connect using the given
mongo instance and a database with default
name "axonframework". |
protected |
AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String userName,
char[] password)
Initializes the MongoTemplate to connect using the given
mongo instance and the database with given
databaseName. |
protected |
AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String authenticationDatabaseName,
String userName,
char[] password)
Initializes the MongoTemplate to connect using the given
mongo instance and the database with given
databaseName. |
| Modifier and Type | Method and Description |
|---|---|
protected com.mongodb.DB |
database()
Returns a reference to the Database with the configured database name.
|
protected AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String userName,
char[] password)
mongo instance and a database with default
name "axonframework". The given userName and password, when not null, are
used to authenticate against the database.mongo - The Mongo instance configured to connect to the Mongo ServeruserName - The username to authenticate with. Use null to skip authenticationpassword - The password to authenticate with. Use null to skip authenticationprotected AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String userName,
char[] password)
mongo instance and the database with given
databaseName. The given userName and password, when not
null, are used to authenticate against the database.mongo - The Mongo instance configured to connect to the Mongo ServerdatabaseName - The name of the database containing the datauserName - The username to authenticate with. Use null to skip authenticationpassword - The password to authenticate with. Use null to skip authenticationprotected AuthenticatingMongoTemplate(com.mongodb.Mongo mongo,
String databaseName,
String authenticationDatabaseName,
String userName,
char[] password)
mongo instance and the database with given
databaseName. The given userName and password, when not
null, are used to authenticate against the database.mongo - The Mongo instance configured to connect to the Mongo ServerdatabaseName - The name of the database containing the datauserName - The username to authenticate with. Use null to skip authenticationpassword - The password to authenticate with. Use null to skip authenticationprotected com.mongodb.DB database()
userName and password are ignored if the database is already
in an authenticated state.DB.isAuthenticated(),
DB.authenticate(String, char[])Copyright © 2010-2014. All Rights Reserved.