|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mongodb.ServerAddress
public class ServerAddress
mongo server address
Constructor Summary | |
---|---|
ServerAddress()
|
|
ServerAddress(InetAddress addr)
|
|
ServerAddress(InetAddress addr,
int port)
|
|
ServerAddress(InetSocketAddress addr)
|
|
ServerAddress(String host)
|
|
ServerAddress(String host,
int port)
|
Method Summary | |
---|---|
static String |
defaultHost()
Returns the default database host. |
static int |
defaultPort()
Returns the default port that the database runs on. |
boolean |
equals(Object other)
|
String |
getHost()
|
int |
getPort()
|
InetSocketAddress |
getSocketAddress()
|
int |
hashCode()
|
boolean |
sameHost(String host)
Determines whether this address is the same as a given host. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ServerAddress() throws UnknownHostException
UnknownHostException
public ServerAddress(String host) throws UnknownHostException
UnknownHostException
public ServerAddress(String host, int port) throws UnknownHostException
UnknownHostException
public ServerAddress(InetAddress addr)
public ServerAddress(InetAddress addr, int port)
public ServerAddress(InetSocketAddress addr)
Method Detail |
---|
public boolean sameHost(String host)
host
- the address to compare
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String getHost()
public int getPort()
public InetSocketAddress getSocketAddress()
public String toString()
toString
in class Object
public static String defaultHost()
public static int defaultPort()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |