org.springframework.data.mongodb
Class CannotGetMongoDbConnectionException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.core.NestedRuntimeException
org.springframework.dao.DataAccessException
org.springframework.dao.NonTransientDataAccessException
org.springframework.dao.NonTransientDataAccessResourceException
org.springframework.dao.DataAccessResourceFailureException
org.springframework.data.mongodb.CannotGetMongoDbConnectionException
- All Implemented Interfaces:
- Serializable
public class CannotGetMongoDbConnectionException
- extends DataAccessResourceFailureException
Exception being thrown in case we cannot connect to a MongoDB instance.
- Author:
- Oliver Gierke
- See Also:
- Serialized Form
Method Summary |
org.springframework.data.authentication.UserCredentials |
getCredentials()
Returns the UserCredentials that were used when trying to connect to the MongoDB instance. |
String |
getDatabase()
Returns the name of the database trying to be accessed. |
CannotGetMongoDbConnectionException
public CannotGetMongoDbConnectionException(String msg,
Throwable cause)
CannotGetMongoDbConnectionException
public CannotGetMongoDbConnectionException(String msg)
CannotGetMongoDbConnectionException
public CannotGetMongoDbConnectionException(String msg,
String database,
org.springframework.data.authentication.UserCredentials credentials)
getCredentials
public org.springframework.data.authentication.UserCredentials getCredentials()
- Returns the
UserCredentials
that were used when trying to connect to the MongoDB instance.
- Returns:
getDatabase
public String getDatabase()
- Returns the name of the database trying to be accessed.
- Returns:
Copyright © 2012. All Rights Reserved.