Currently (I don't have the code here so correct me if I am wrong) when a
Ftplet method invoked via beforeCommand()  returns FtpletResult.SKIP the
command itself is not called but afterCommand still gets called.
By reading the docs i cannot conclude if this the expected behaviour  for I
cannot understand the sentence between brackets. Is it because of my broken
English or some typo?
*SKIP* : It indicates that the server will skip everything. No further
processing will be done for this request (besides called afterCommand is
SKIP is returned before the command invocation).

To my mind, in most cases when we return SKIP we would also want to skip the
afterCommand( e.g.,   I check if the data channel is secured in
 beforeCommand and if it is not, I  write an appropiate response and return
SKIP  . Afterwards,  onUploadEnd() could try to copy the file to another
location, update the database to record the event of the arrival ... In this
case, I don't want afterCommand to be called.
You may argue that there're cases in which we still want that the
afterCommand be called. So my proposal would be to add a new result so we
can have a return code meaning "skip everything" and another one meaning
"call afterCommand if it exists".

Makes sense?

Reply via email to