Package org.apache.juneau.http.remote
Interface RemoteUrlPolicy.AddressResolver
- Enclosing class:
- RemoteUrlPolicy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Resolves the
InetAddress candidates for a hostname. Injectable so pin-on-connect tests can simulate
DNS rebinding / mixed A+AAAA / blocked-address resolution without depending on live (and flaky) DNS.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RemoteUrlPolicy.AddressResolverThe production resolver: real DNS resolution viaInetAddress.getAllByName(String). -
Method Summary
Modifier and TypeMethodDescriptionResolveshostto its candidate addresses.
-
Field Details
-
DEFAULT
The production resolver: real DNS resolution viaInetAddress.getAllByName(String).
-
-
Method Details
-
resolve
Resolveshostto its candidate addresses.- Parameters:
host- The hostname (or IP literal) to resolve.- Returns:
- The resolved candidate addresses. Never
null or empty on success. - Throws:
UnknownHostException- If the host cannot be resolved.
-