MongoClientURI@Deprecated public class MongoURI extends Object
Represents a URI which can be used to create a Mongo instance. The URI describes the hosts to be used and options.
This class has been superseded by MongoClientURI, and may be removed in a future release.
MongoClientURI| Modifier and Type | Field | Description | 
|---|---|---|
| static String | MONGODB_PREFIX | Deprecated.  The prefix for mongodb URIs. | 
| Constructor | Description | 
|---|---|
| MongoURI(MongoClientURI proxied) | Deprecated.  | 
| MongoURI(String uri) | Deprecated. 
 Replaced by  MongoClientURI(String) | 
| Modifier and Type | Method | Description | 
|---|---|---|
| Mongo | connect() | Deprecated.  Creates a Mongo instance based on the URI. | 
| DBCollection | connectCollection(DB db) | Deprecated.  Returns the URI's Collection from a given DB object. | 
| DBCollection | connectCollection(Mongo mongo) | Deprecated.  Returns the URI's Collection from a given Mongo instance | 
| DB | connectDB() | Deprecated.  Returns the DB object from a newly created Mongo instance based on this URI. | 
| DB | connectDB(Mongo mongo) | Deprecated.  Returns the URI's DB object from a given Mongo instance. | 
| String | getCollection() | Deprecated.  Gets the collection name. | 
| MongoCredential | getCredentials() | Deprecated.  Gets the credentials. | 
| String | getDatabase() | Deprecated.  Gets the database name. | 
| List<String> | getHosts() | Deprecated.  Gets the list of hosts. | 
| MongoOptions | getOptions() | Deprecated.  Gets the options. | 
| char[] | getPassword() | Deprecated.  Gets the password. | 
| String | getUsername() | Deprecated.  Gets the username. | 
| String | toString() | Deprecated.  | 
public static final String MONGODB_PREFIX
@Deprecated public MongoURI(String uri)
MongoClientURI(String)uri - the URI@Deprecated public MongoURI(MongoClientURI proxied)
MongoClientURI.proxied - the MongoClientURI to wrap with this deprecated class. * @deprecated Replaced by MongoClientURI)@Nullable public String getUsername()
@Nullable public char[] getPassword()
public List<String> getHosts()
@Nullable public String getDatabase()
@Nullable public String getCollection()
@Nullable public MongoCredential getCredentials()
public MongoOptions getOptions()
MongoOptions for every call, so it's possible to mutate the
 returned instance to change the defaults.public Mongo connect()
MongoException - if there's a failurepublic DB connectDB()
MongoException - if there's a failurepublic DB connectDB(Mongo mongo)
mongo - the Mongo instance to get the database from.public DBCollection connectCollection(DB db)
db - the database to get the collection frompublic DBCollection connectCollection(Mongo mongo)
mongo - the mongo instance to get the collection from