|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.http.impl.conn.InMemoryDnsResolver
public class InMemoryDnsResolver
In-memory DnsResolver implementation.
| Constructor Summary | |
|---|---|
InMemoryDnsResolver()
Builds a DNS resolver that will resolve the host names against a collection held in-memory. |
|
| Method Summary | |
|---|---|
void |
add(String host,
InetAddress... ips)
Associates the given array of IP addresses to the given host in this DNS overrider. |
InetAddress[] |
resolve(String host)
Returns the IP address for the specified host name, or null if the given host is not recognized or the associated IP address cannot be used to build an InetAddress instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InMemoryDnsResolver()
| Method Detail |
|---|
public void add(String host,
InetAddress... ips)
host - The host name to be associated with the given IP.ips - array of IP addresses to be resolved by this DNS overrider to the given
host name.
public InetAddress[] resolve(String host)
throws UnknownHostException
resolve in interface DnsResolverhost - The host name to be resolved by this resolver.
UnknownHostExceptionInetAddress
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||