com.mongodb
Class MongoURI

java.lang.Object
  extended by com.mongodb.MongoURI

public class MongoURI
extends Object


Constructor Summary
MongoURI(String uri)
          examples mongodb://localhost mongodb://fred:foobar@localhost/
 
Method Summary
 Mongo connect()
           
 DBCollection connectCollection(DB db)
           
 DBCollection connectCollection(Mongo m)
           
 DB connectDB()
           
 DB connectDB(Mongo m)
           
 String getCollection()
           
 String getDatabase()
           
 List<String> getHosts()
           
 MongoOptions getOptions()
           
 char[] getPassword()
           
 String getUsername()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MongoURI

public MongoURI(String uri)
examples mongodb://localhost mongodb://fred:foobar@localhost/


MongoDB Doc Links
Method Detail

getUsername

public String getUsername()

getPassword

public char[] getPassword()

getHosts

public List<String> getHosts()

getDatabase

public String getDatabase()

getCollection

public String getCollection()

getOptions

public MongoOptions getOptions()

connect

public Mongo connect()
              throws MongoException,
                     UnknownHostException
Throws:
MongoException
UnknownHostException

connectDB

public DB connectDB()
             throws MongoException,
                    UnknownHostException
Throws:
MongoException
UnknownHostException

connectDB

public DB connectDB(Mongo m)

connectCollection

public DBCollection connectCollection(DB db)

connectCollection

public DBCollection connectCollection(Mongo m)

toString

public String toString()
Overrides:
toString in class Object