it.sauronsoftware.ftp4j.connectors
Class SSLConnector

java.lang.Object
  extended byit.sauronsoftware.ftp4j.connectors.SSLConnector
All Implemented Interfaces:
FTPConnector

public class SSLConnector
extends java.lang.Object
implements FTPConnector

The SSLConnector connects the remote host using a SSL channel.

Since:
1.2
Author:
Carlo Pelliccia

Constructor Summary
SSLConnector()
           
 
Method Summary
 FTPConnection connectForCommunicationChannel(java.lang.String host, int port)
          This methods returns an established connection to a remote host, suitable for a FTP communication channel.
 FTPConnection connectForDataTransferChannel(java.lang.String host, int port)
          This methods returns an established connection to a remote host, suitable for a FTP data transfer channel.
 javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
          Returns the socket factory used by the connector.
 void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
          Sets the socket factory used by the connector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SSLConnector

public SSLConnector()
Method Detail

getSSLSocketFactory

public javax.net.ssl.SSLSocketFactory getSSLSocketFactory()
Returns the socket factory used by the connector.

Returns:
The socket factory.
Since:
1.3

setSSLSocketFactory

public void setSSLSocketFactory(javax.net.ssl.SSLSocketFactory factory)
Sets the socket factory used by the connector.

Parameters:
factory - The socket factory.
Since:
1.3

connectForCommunicationChannel

public FTPConnection connectForCommunicationChannel(java.lang.String host,
                                                    int port)
                                             throws java.io.IOException
Description copied from interface: FTPConnector
This methods returns an established connection to a remote host, suitable for a FTP communication channel.

Specified by:
connectForCommunicationChannel in interface FTPConnector
Parameters:
host - The remote host name or address.
port - The remote port.
Returns:
The connection with the remote host.
Throws:
java.io.IOException - If the connection cannot be established.

connectForDataTransferChannel

public FTPConnection connectForDataTransferChannel(java.lang.String host,
                                                   int port)
                                            throws java.io.IOException
Description copied from interface: FTPConnector
This methods returns an established connection to a remote host, suitable for a FTP data transfer channel.

Specified by:
connectForDataTransferChannel in interface FTPConnector
Parameters:
host - The remote host name or address.
port - The remote port.
Returns:
The connection with the remote host.
Throws:
java.io.IOException - If the connection cannot be established.