Package org.microproxy
Class DefaultHostResolver
java.lang.Object
org.microproxy.DefaultHostResolver
- All Implemented Interfaces:
HostResolver
Resolves host names with
InetAddress.getByName(java.lang.String).-
Constructor Summary
ConstructorsConstructorDescriptionCreates a resolver using the JDK host-name lookup facilities. -
Method Summary
Modifier and TypeMethodDescriptionResolves a host name and associates it with the requested port.
-
Constructor Details
-
DefaultHostResolver
public DefaultHostResolver()Creates a resolver using the JDK host-name lookup facilities.
-
-
Method Details
-
resolve
Description copied from interface:HostResolverResolves a host name and associates it with the requested port.- Specified by:
resolvein interfaceHostResolver- Parameters:
host- the destination host nameport- the destination port- Returns:
- the resolved destination socket address
- Throws:
UnknownHostException- if the host cannot be resolved
-