public class JavaExecutorWaarpFtp4jClient extends Object implements GatewayRunnable
Result of arguments will be as FTP command.
Format is the following:
"-file filepath
-to requestedHost
-port port
-user user
-pwd pwd
[-account account]
[-mode active/passive]
[-ssl no/implicit/explicit]
[-cwd remotepath]
[-digest (crc,md5,sha1)]
[-pre extraCommand1 with ',' as separator of arguments]
-command command from (get,put,append)
[-post extraCommand2 with ',' as separator of arguments]"
The order of commands will be:
1) connection to requestHost on port (if ssl native => using native ssl
link)
2) User user
3) PASS pwd
4) if account => ACCT account
5) if -ssl & auth => AUTH, PBSZ 0, PROT P
6) if passive => PASV
7) CWD remotepath; if error => MKD remotepath then CWD remotepath (and
ignoring any error)
8) if pre => extraCommand1 with ',' replaced by ' ' (note: do not use
standard commands from FTP like
ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE,
MDTM,MLSD,MLST,SIZE,AUTH)
9) BINARY (binary format)
10) if get => RETR filepath.basename ; if put => STOR filepath ; if append
=>
APPE filepath.basename
11) if digest & get/put/append & remote site compatible with XCRC,XMD5,XSHA1
=> FEAT (parsing if found
corresponding XCRC,XMD5,XSHA1) ; then XCRC/XMD5/XSHA1 filepath.basename ;
then locally comparing this
XCRC/XMD5/XSHA1 with the local file
12) if post => extraCommand2 with ',' replaced by ' ' (note: do not use
standard commands from FTP like
ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE
,MDTM,MLSD,MLST,SIZE,AUTH)
13) QUIT
Constructor and Description |
---|
JavaExecutorWaarpFtp4jClient() |
Modifier and Type | Method and Description |
---|---|
int |
getFinalStatus() |
void |
run()
"-file filepath
-to requestedHost -port port -user user -pwd pwd [-account account] [-mode active/passive] [-ssl no/implicit/explicit] [-cwd remotepath] [-digest (crc,md5,sha1)] [-pre extraCommand1 with ',' as separator of arguments] -command command from (get,put,append) [-post extraCommand2 with ',' as separator of arguments]" |
void |
setArgs(boolean waitForValidation,
boolean useLocalExec,
int delay,
String[] args)
The way the parameter will be set
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
toString
public void run()
public void setArgs(boolean waitForValidation, boolean useLocalExec, int delay, String[] args)
GatewayRunnable
setArgs
in interface GatewayRunnable
waitForValidation
- True if the caller will wait up to delay
time
in msuseLocalExec
- True if currently is configured to use
LocalExec
(may be ignored)delay
- Delay in ms used only if waitForValidation is Trueargs
- First arg is the Class name usedpublic int getFinalStatus()
getFinalStatus
in interface GatewayRunnable
Copyright © 2009–2020 Waarp. All rights reserved.