Package org.apache.commons.net.ftp
Class FTPClient.NatServerResolverImpl
- java.lang.Object
-
- org.apache.commons.net.ftp.FTPClient.NatServerResolverImpl
-
- All Implemented Interfaces:
FTPClient.HostnameResolver
- Enclosing class:
- FTPClient
public static class FTPClient.NatServerResolverImpl extends java.lang.Object implements FTPClient.HostnameResolver
Default strategy for passive NAT workaround (site-local replies are replaced.)- Since:
- 3.6
-
-
Constructor Summary
Constructors Constructor Description NatServerResolverImpl(FTPClient client)Constructs a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringresolve(java.lang.String hostname)Resolves a host name.
-
-
-
Field Detail
-
client
private final FTPClient client
-
-
Constructor Detail
-
NatServerResolverImpl
public NatServerResolverImpl(FTPClient client)
Constructs a new instance.- Parameters:
client- the FTP client.
-
-
Method Detail
-
resolve
public java.lang.String resolve(java.lang.String hostname) throws java.net.UnknownHostExceptionDescription copied from interface:FTPClient.HostnameResolverResolves a host name.- Specified by:
resolvein interfaceFTPClient.HostnameResolver- Parameters:
hostname- the hostname to resolve.- Returns:
- The resolved hostname.
- Throws:
java.net.UnknownHostException- if the host is unknown.
-
-