Package com.enterprisedt.net.ftp
Class FTPClientFactory
java.lang.Object
com.enterprisedt.net.ftp.FTPClientFactory
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProFTPClientInterfacecreateClient(Protocol protocol) Create an FTP client that supports the supplied protocol.static ProFTPClientInterfacecreateClient(Protocol protocol, boolean serverValidation) Create an FTP client that supports the supplied protocol.
-
Constructor Details
-
FTPClientFactory
public FTPClientFactory()
-
-
Method Details
-
createClient
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 requiredserverValidation- true if server validation required (recommended)- Returns:
- an instance of an FTP client supporting the supplied protocol
- Throws:
FTPException
-