public class BannedHostResolver extends Object implements HostResolver
resolve(String) method.
This implementation will throw an exception if it receives a host that resolves to an IP in the restricted list.
Do note, that even if a specific IP is to be connected to, the IP will still be resolved through this class and eventually be blocked if required.
| Constructor and Description |
|---|
BannedHostResolver(List<String> bannedCidrs) |
| Modifier and Type | Method and Description |
|---|---|
InetAddress[] |
resolve(String host)
Get an array of IP addresses for a host
|
public InetAddress[] resolve(String host) throws UnknownHostException
HostResolverresolve in interface HostResolverhost - host to get ip for. Can just be an ip itselfUnknownHostException - if the host cannot be found, or BannedHostException if the ip is blacklistedCopyright © 2012–2018 Atlassian. All rights reserved.