com.mongodb
Class MongoURI

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

public class MongoURI
extends java.lang.Object


Constructor Summary
MongoURI(java.lang.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)
           
 java.lang.String getCollection()
           
 java.lang.String getDatabase()
           
 java.util.List<java.lang.String> getHosts()
           
 MongoOptions getOptions()
           
 char[] getPassword()
           
 java.lang.String getUsername()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MongoURI

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


MongoDB Doc Links
Method Detail

getUsername

public java.lang.String getUsername()

getPassword

public char[] getPassword()

getHosts

public java.util.List<java.lang.String> getHosts()

getDatabase

public java.lang.String getDatabase()

getCollection

public java.lang.String getCollection()

getOptions

public MongoOptions getOptions()

connect

public Mongo connect()
              throws MongoException,
                     java.net.UnknownHostException
Throws:
MongoException
java.net.UnknownHostException

connectDB

public DB connectDB()
             throws MongoException,
                    java.net.UnknownHostException
Throws:
MongoException
java.net.UnknownHostException

connectDB

public DB connectDB(Mongo m)

connectCollection

public DBCollection connectCollection(DB db)

connectCollection

public DBCollection connectCollection(Mongo m)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object