Package | Description |
---|---|
com.mongodb |
This package is the main entry point to the MongoDB Java Driver, and it contains the classes for the existing API from 2.x versions.
|
com.mongodb.async.client |
This packages contains classes for the new async client
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
com.mongodb.operation |
The core of the MongoDB driver works via operations, using the command pattern.
|
Modifier and Type | Method and Description |
---|---|
static MongoCredential |
MongoCredential.createCredential(String userName,
String database,
char[] password)
Creates a MongoCredential instance with an unspecified mechanism.
|
static MongoCredential |
MongoCredential.createGSSAPICredential(String userName)
Creates a MongoCredential instance for the GSSAPI SASL mechanism.
|
static MongoCredential |
MongoCredential.createMongoCRCredential(String userName,
String database,
char[] password)
Creates a MongoCredential instance for the MongoDB Challenge Response protocol.
|
static MongoCredential |
MongoCredential.createMongoX509Credential(String userName)
Creates a MongoCredential instance for the MongoDB X.509 protocol.
|
static MongoCredential |
MongoCredential.createPlainCredential(String userName,
String source,
char[] password)
Creates a MongoCredential instance for the PLAIN SASL mechanism.
|
static MongoCredential |
MongoCredential.createScramSha1Credential(String userName,
String source,
char[] password)
Creates a MongoCredential instance for the SCRAM-SHA-1 SASL mechanism.
|
MongoCredential |
MongoSecurityException.getCredential()
The credential being authenticated.
|
MongoCredential |
MongoClientURI.getCredentials()
Gets the credentials.
|
MongoCredential |
MongoURI.getCredentials()
Deprecated.
Gets the credentials.
|
<T> MongoCredential |
MongoCredential.withMechanismProperty(String key,
T value)
Creates a new MongoCredential as a copy of this instance, with the specified mechanism property added.
|
Modifier and Type | Method and Description |
---|---|
List<MongoCredential> |
ConnectionString.getCredentialList()
Gets the credentials.
|
List<MongoCredential> |
MongoClient.getCredentialsList()
Gets the list of credentials that this client authenticates all connections with
|
Constructor and Description |
---|
MongoSecurityException(MongoCredential credential,
String message)
Construct an instance
|
MongoSecurityException(MongoCredential credential,
String message,
Throwable cause)
Construct an instance
|
Constructor and Description |
---|
MongoClient(List<ServerAddress> seeds,
List<MongoCredential> credentialsList)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
MongoClient(List<ServerAddress> seeds,
List<MongoCredential> credentialsList,
MongoClientOptions options)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
MongoClient(ServerAddress addr,
List<MongoCredential> credentialsList)
Creates a Mongo instance based on a (single) mongodb node and a list of credentials
|
MongoClient(ServerAddress addr,
List<MongoCredential> credentialsList,
MongoClientOptions options)
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and default options.
|
Modifier and Type | Method and Description |
---|---|
List<MongoCredential> |
MongoClientSettings.getCredentialList()
Gets the credential list.
|
Modifier and Type | Method and Description |
---|---|
MongoClientSettings.Builder |
MongoClientSettings.Builder.credentialList(List<MongoCredential> credentialList)
Sets the credential list.
|
Modifier and Type | Method and Description |
---|---|
Cluster |
ClusterFactory.create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener)
Creates a cluster with the given settings.
|
Cluster |
DefaultClusterFactory.create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener) |
Cluster |
DefaultClusterFactory.create(ClusterSettings settings,
ServerSettings serverSettings,
ConnectionPoolSettings connectionPoolSettings,
StreamFactory streamFactory,
StreamFactory heartbeatStreamFactory,
List<MongoCredential> credentialList,
ClusterListener clusterListener,
ConnectionPoolListener connectionPoolListener,
ConnectionListener connectionListener,
CommandListener commandListener)
Creates a cluster with the given settings.
|
Modifier and Type | Method and Description |
---|---|
MongoCredential |
CreateUserOperation.getCredential()
Gets the users credentials.
|
MongoCredential |
UpdateUserOperation.getCredential()
Gets the users credentials.
|
Constructor and Description |
---|
CreateUserOperation(MongoCredential credential,
boolean readOnly)
Construct a new instance.
|
UpdateUserOperation(MongoCredential credential,
boolean readOnly)
Construct a new instance.
|
Copyright © 2016. All Rights Reserved.