Class FTPClientFactory

java.lang.Object
com.enterprisedt.net.ftp.FTPClientFactory

public class FTPClientFactory extends Object
Factory class that permits creating a variety of different FTP clients based on the file transfer protocol required. Plain FTP and various secure FTP protocols are supported.
Version:
$Revision$
Author:
Bruce Blackshaw
  • Constructor Details

    • FTPClientFactory

      public FTPClientFactory()
  • Method Details

    • createClient

      public static ProFTPClientInterface createClient(Protocol protocol) throws FTPException
      Create an FTP client that supports the supplied protocol. For secure clients, server validation is switched on by default.
      Parameters:
      protocol - file transfer protocol required
      Returns:
      an instance of an FTP client supporting the supplied protocol
      Throws:
      FTPException
    • createClient

      public static ProFTPClientInterface createClient(Protocol protocol, boolean serverValidation) throws FTPException
      Create an FTP client that supports the supplied protocol. Secure clients can be created with server validation enabled or disabled. It is recommended that disabling server validation is only used for testing.
      Parameters:
      protocol - file transfer protocol required
      serverValidation - true if server validation required (recommended)
      Returns:
      an instance of an FTP client supporting the supplied protocol
      Throws:
      FTPException