java.lang.Object | |
↳ | com.mongodb.MongoURI |
Represents a URI
which can be used to create a Mongo instance. The URI describes the hosts to
be used and options.
The Java driver supports the following options (case insensitive):
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | MONGODB_PREFIX |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a MongoURI described by a String.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
creates a Mongo instance based on the URI@return
| |||||||||||
returns the URI's Collection from a given Mongo instance
| |||||||||||
returns the URI's Collection from a given DB object
| |||||||||||
returns the DB object from a newly created Mongo instance based on this URI@return
| |||||||||||
returns the URI's DB object from a given Mongo instance
| |||||||||||
Gets the collection name
| |||||||||||
Gets the database name
| |||||||||||
Gets the list of hosts
| |||||||||||
Gets the options
| |||||||||||
Gets the password
| |||||||||||
Gets the username
| |||||||||||
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates a MongoURI described by a String. examples mongodb://127.0.0.1 mongodb://fred:foobar@127.0.0.1/
uri | the URI |
---|
creates a Mongo instance based on the URI@return
MongoException | |
UnknownHostException | |
MongoException |
returns the URI's Collection from a given Mongo instance
returns the DB object from a newly created Mongo instance based on this URI@return
MongoException | |
UnknownHostException | |
MongoException |
Gets the password