|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
public class DefaultFTPFileEntryParserFactory
This is the default implementation of the FTPFileEntryParserFactory interface. This is the implementation that will be used by org.apache.commons.net.ftp.FTPClient.listFiles() if no other implementation has been specified.
FTPClient.listFiles(java.lang.String, java.lang.String)
,
FTPClient.setParserFactory(org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory)
Constructor Summary | |
---|---|
DefaultFTPFileEntryParserFactory()
|
Method Summary | |
---|---|
FTPFileEntryParser |
createFileEntryParser(FTPClientConfig config)
Implementation extracts a key from the supplied FTPClientConfig
parameter and creates an object implementing the
interface FTPFileEntryParser and uses the supplied configuration
to configure it. |
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 |
createMVSEntryParser()
|
FTPFileEntryParser |
createNTFTPEntryParser()
|
FTPFileEntryParser |
createOS2FTPEntryParser()
|
FTPFileEntryParser |
createOS400FTPEntryParser()
|
FTPFileEntryParser |
createUnixFTPEntryParser()
|
FTPFileEntryParser |
createVMSVersioningFTPEntryParser()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultFTPFileEntryParserFactory()
Method Detail |
---|
public FTPFileEntryParser createFileEntryParser(String key)
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.
createFileEntryParser
in interface FTPFileEntryParserFactory
key
- should be a fully qualified classname corresponding to
a class implementing the FTPFileEntryParser interfaceParserInitializationException
- thrown if for any reason the factory cannot resolve
the supplied key into an FTPFileEntryParser.FTPFileEntryParser
public FTPFileEntryParser createFileEntryParser(FTPClientConfig config) throws ParserInitializationException
Implementation extracts a key from the supplied
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.
createFileEntryParser
in interface FTPFileEntryParserFactory
config
- A FTPClientConfig
used to configure the parser created
ParserInitializationException
- Thrown on any exception in instantiationpublic FTPFileEntryParser createUnixFTPEntryParser()
public FTPFileEntryParser createVMSVersioningFTPEntryParser()
public FTPFileEntryParser createNTFTPEntryParser()
public FTPFileEntryParser createOS2FTPEntryParser()
public FTPFileEntryParser createOS400FTPEntryParser()
public FTPFileEntryParser createMVSEntryParser()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |