flux.file
Interface FtpHost

All Superinterfaces:
Host, NetworkHost
All Known Subinterfaces:
FtpSslHost, SecureFtpHost

public interface FtpHost
extends NetworkHost

Represents an FTP host on a network.

Some file triggers use the timestamps from FTP servers to determine when to fire. However, most FTP servers provide timestamps with minute resolution only, not second resolution. Consequently, some changes to files on FTP servers cannot be detected if two or more file changes occur within the same minute.

All files are transferred in binary mode, not ASCII mode.

Finally, when an FTP or Secure FTP (SFTP) host is used, if the base directory of the corresponding file criteria is ".", it is silently changed to "" when the flow chart is verified, in order to retain compliance with the FTP specification. If the base directory otherwise starts with a ".", the flow chart will fail verification.

Author:
Copyright 2014 Flux Corporation. All rights reserved.

Method Summary
 java.lang.Class getFileListParser()
          Returns the optional class that parses FTP directory listings.
 FtpTransferMode getTransferMode()
          Returns the FTP file transfer mode used to transfer files.
 boolean isIssueCdCommandsMode()
          Indicates whether "CD" commands are issued as part of the FTP protocol.
 boolean isPassiveMode()
          Returns whether the FTP network connection is passive.
 void setFileListParser(java.lang.Class fileListParser)
          Sets the class that parses FTP directory listings.
 void setIssueCdCommandsMode(boolean enabled)
          Sets whether "CD" commands are issued as part of the FTP protocol.
 void setPassiveMode(boolean passive)
          Sets whether the FTP network connection is passive.
 void setTransferMode(FtpTransferMode transferMode)
          Sets the FTP file transfer mode used to transfer files.
 
Methods inherited from interface flux.file.NetworkHost
getName, getPassword, getPort, getPortAsString, getUsername, setName, setPassword, setPort, setPortAsString, setUsername
 

Method Detail

getFileListParser

java.lang.Class getFileListParser()
                                  throws EngineException
Returns the optional class that parses FTP directory listings. If not set, a standard internal parser is used to parse standard FTP directory listings.

Returns:
The optional class that parses FTP directory listings. If not null, this class implements the flux.file.FtpFileListParser interface.
Throws:
EngineException - If a system error occurs.

getTransferMode

FtpTransferMode getTransferMode()
Returns the FTP file transfer mode used to transfer files. Defaults to BINARY mode.

Returns:
The FTP transfer mode used to transfers files.

isIssueCdCommandsMode

boolean isIssueCdCommandsMode()
Indicates whether "CD" commands are issued as part of the FTP protocol. Needed for some non-standard FTP servers. Defaults to false.

Returns:
Whether "CD" commands are issued as part of the FTP protocol.

isPassiveMode

boolean isPassiveMode()
Returns whether the FTP network connection is passive. Defaults to passive. Passive network connections are firewall-friendly but require support from the FTP server.

Returns:
whether the FTP connection is passive.

setFileListParser

void setFileListParser(java.lang.Class fileListParser)
                       throws EngineException
Sets the class that parses FTP directory listings. If not set, a standard internal parser is used to parse standard FTP directory listings.

Parameters:
fileListParser - The class that parses FTP directory listings. This class must implement the flux.file.FtpFileListParser interface.
Throws:
java.lang.IllegalArgumentException - If fileListParser is null, does not implement the flux.file.FtpFileListParser interface, or does not have a default constructor.
EngineException - If the class argument does not have a default constructor or does not implement flux.file.FtpFileListParser.

setIssueCdCommandsMode

void setIssueCdCommandsMode(boolean enabled)
Sets whether "CD" commands are issued as part of the FTP protocol. Needed for some non-standard FTP servers. Defaults to false.

Parameters:
enabled - Whether "CD" commands are issued as part of the FTP protocol.

setPassiveMode

void setPassiveMode(boolean passive)
Sets whether the FTP network connection is passive. Defaults to passive. Passive network connections are firewall-friendly but require support from the FTP server.

Parameters:
passive - Whether the FTP connection is passive.

setTransferMode

void setTransferMode(FtpTransferMode transferMode)
Sets the FTP file transfer mode used to transfer files. Defaults to BINARY mode.

Parameters:
transferMode - The FTP transfer mode used to transfers files.


© 2014 Flux Corporation. All rights reserved.