public class FTPProxyConnector extends FTPConnector
| Modifier and Type | Field and Description |
|---|---|
int |
style
The style used by the proxy.
|
static int |
STYLE_OPEN_COMMAND
Requires the connection to the remote host through a OPEN command without
proxy authentication.
|
static int |
STYLE_SITE_COMMAND
Requires the connection to the remote host through a SITE command after
proxy authentication.
|
closeTimeout, connectionTimeout, readTimeout| Constructor and Description |
|---|
FTPProxyConnector(java.lang.String proxyHost,
int proxyPort)
Builds the connector.
|
FTPProxyConnector(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUser,
java.lang.String proxyPass)
Builds the connector.
|
| Modifier and Type | Method and Description |
|---|---|
java.net.Socket |
connectForCommunicationChannel(java.lang.String host,
int port)
This methods returns an established connection to a remote host, suitable
for a FTP communication channel.
|
java.net.Socket |
connectForDataTransferChannel(java.lang.String host,
int port)
This methods returns an established connection to a remote host, suitable
for a FTP data transfer channel.
|
void |
setStyle(int style)
Sets the style used by the proxy.
|
abortConnectForCommunicationChannel, setCloseTimeout, setConnectionTimeout, setReadTimeout, setUseSuggestedAddressForDataConnections, tcpConnectForCommunicationChannel, tcpConnectForDataTransferChannelpublic static final int STYLE_SITE_COMMAND
public static final int STYLE_OPEN_COMMAND
public int style
public FTPProxyConnector(java.lang.String proxyHost,
int proxyPort,
java.lang.String proxyUser,
java.lang.String proxyPass)
proxyHost - The proxy host name.proxyPort - The proxy port.proxyUser - The username for proxy authentication.proxyPass - The password for proxy authentication.public FTPProxyConnector(java.lang.String proxyHost,
int proxyPort)
proxyHost - The proxy host name.proxyPort - The proxy port.public void setStyle(int style)
STYLE_SITE_COMMAND - Requires the connection to
the remote host through a SITE command after proxy authentication.
STYLE_OPEN_COMMAND - Requires the connection to
the remote host through a OPEN command without proxy authentication.
Default value for the style is STYLE_SITE_COMMAND.style - The style.STYLE_SITE_COMMAND,
STYLE_OPEN_COMMANDpublic java.net.Socket connectForCommunicationChannel(java.lang.String host,
int port)
throws java.io.IOException
FTPConnectorconnectForCommunicationChannel in class FTPConnectorhost - The remote host name or address.port - The remote port.java.io.IOException - If the connection cannot be established.public java.net.Socket connectForDataTransferChannel(java.lang.String host,
int port)
throws java.io.IOException
FTPConnectorconnectForDataTransferChannel in class FTPConnectorhost - The remote host name or address.port - The remote port.java.io.IOException - If the connection cannot be established.