Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.net.ftp.parser
Class DefaultFTPFileEntryParserFactory  view DefaultFTPFileEntryParserFactory download DefaultFTPFileEntryParserFactory.java

java.lang.Object
  extended byorg.apache.commons.net.ftp.parser.DefaultFTPFileEntryParserFactory
All Implemented Interfaces:
FTPFileEntryParserFactory

public class DefaultFTPFileEntryParserFactory
extends java.lang.Object
implements FTPFileEntryParserFactory

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.


Field Summary
private  org.apache.commons.net.ftp.FTPClientConfig config
           
 
Constructor Summary
DefaultFTPFileEntryParserFactory()
           
 
Method Summary
 org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(org.apache.commons.net.ftp.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.
 org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(java.lang.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.
 org.apache.commons.net.ftp.FTPFileEntryParser createMVSEntryParser()
           
 org.apache.commons.net.ftp.FTPFileEntryParser createNTFTPEntryParser()
           
 org.apache.commons.net.ftp.FTPFileEntryParser createOS2FTPEntryParser()
           
 org.apache.commons.net.ftp.FTPFileEntryParser createOS400FTPEntryParser()
           
 org.apache.commons.net.ftp.FTPFileEntryParser createUnixFTPEntryParser()
           
 org.apache.commons.net.ftp.FTPFileEntryParser createVMSVersioningFTPEntryParser()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

private org.apache.commons.net.ftp.FTPClientConfig config
Constructor Detail

DefaultFTPFileEntryParserFactory

public DefaultFTPFileEntryParserFactory()
Method Detail

createFileEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(java.lang.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. If that succeeds, a parser object of this class is instantiated and is returned; otherwise it attempts to interpret the key as an identirier commonly used by the FTP SYST command to identify systems.

If 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.

Specified by:
createFileEntryParser in interface FTPFileEntryParserFactory

createFileEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createFileEntryParser(org.apache.commons.net.ftp.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.

Specified by:
createFileEntryParser in interface FTPFileEntryParserFactory
Since:
1.4

createUnixFTPEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createUnixFTPEntryParser()

createVMSVersioningFTPEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createVMSVersioningFTPEntryParser()

createNTFTPEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createNTFTPEntryParser()

createOS2FTPEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createOS2FTPEntryParser()

createOS400FTPEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createOS400FTPEntryParser()

createMVSEntryParser

public org.apache.commons.net.ftp.FTPFileEntryParser createMVSEntryParser()