org.apache.commons.net.ftp.parser
public class DefaultFTPFileEntryParserFactory extends Object implements FTPFileEntryParserFactory
Method Summary | |
---|---|
FTPFileEntryParser | createFileEntryParser(String key)
This default implementation of the FTPFileEntryParserFactory
interface works according to the following logic:
First it attempts to interpret the supplied key as a fully
qualified classname of a class implementing the
FTPFileEntryParser interface. |
FTPFileEntryParser | createFileEntryParser(FTPClientConfig config) Implementation extracts a key from the supplied {@link FTPClientConfig FTPClientConfig} parameter and creates an object implementing the interface FTPFileEntryParser and uses the supplied configuration to configure it. |
FTPFileEntryParser | createMVSEntryParser() |
FTPFileEntryParser | createNTFTPEntryParser() |
FTPFileEntryParser | createOS2FTPEntryParser() |
FTPFileEntryParser | createOS400FTPEntryParser() |
FTPFileEntryParser | createUnixFTPEntryParser() |
FTPFileEntryParser | createVMSVersioningFTPEntryParser() |
key
is not recognized as a fully qualified
classname known to the system, this method will then attempt
to see whether it contains a string identifying one of
the known parsers. This comparison is case-insensitive.
The intent here is where possible, to select as keys strings
which are returned by the SYST command on the systems which
the corresponding parser successfully parses. This enables
this factory to be used in the auto-detection system.
Parameters: key should be a fully qualified classname corresponding to
a class implementing the FTPFileEntryParser interface
OR
a string containing (case-insensitively) one of the
following keywords:
Returns: the FTPFileEntryParser corresponding to the supplied key.
Throws: ParserInitializationException thrown if for any reason the factory cannot resolve the supplied key into an FTPFileEntryParser.
See Also: FTPFileEntryParser
Implementation extracts a key from the supplied {@link FTPClientConfig FTPClientConfig} parameter and creates an object implementing the interface FTPFileEntryParser and uses the supplied configuration to configure it.
Note that this method will generally not be called in scenarios that call for autodetection of parser type but rather, for situations where the user knows that the server uses a non-default configuration and knows what that configuration is.
Parameters: config A {@link FTPClientConfig FTPClientConfig} used to configure the parser created
Returns: the @link FTPFileEntryParser FTPFileEntryParser} so created.
Throws: ParserInitializationException Thrown on any exception in instantiation
Since: 1.4