FtpServer
  1. FtpServer
  2. FTPSERVER-222

Enhance the Ftplet.afterCommand method to include the result of the command that was executed

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-M4
    • Component/s: Ftplets
    • Labels:
      None

      Description

      The aftterCommand method in the Ftplet interface is a great way to listen for events from the FtpServer, however, this call back method does not tell anything about the result of the command execution.

      Change the signature of this method to include the result of the command.

      More information on this is available at http://www.mail-archive.com/ftpserver-users@mina.apache.org/msg00407.html.

      1. ftpserver_patch.txt
        30 kB
        Sai Pullabhotla

        Activity

        Hide
        Sai Pullabhotla added a comment -

        Sorry, I did not even look at the test packages. Did not configure
        them as source folders in my eclipse. I left the following TODO's in
        the DefaultFtplet class for you to consider:

        1. TODO remove unncessary throws clause from onXXXStart and onXXXEnd methods.
        2. TODO consider splitting the onLogin method into two - onLoginStart
        and onLoginEnd, fire these two methods on the PASS command.

        I think we can ignore #1, but #2 makes sense so these methods are
        consistent with the rest.

        Regarding test cases, I'm not sure what you are looking, if you could
        provide me some details, I will see what I can do.

        Sai Pullabhotla
        Phone: (402) 408-5753
        Fax: (402) 408-6861
        www.jMethods.com

        On Thu, Nov 20, 2008 at 3:56 PM, Niklas Gustavsson (JIRA)

        Show
        Sai Pullabhotla added a comment - Sorry, I did not even look at the test packages. Did not configure them as source folders in my eclipse. I left the following TODO's in the DefaultFtplet class for you to consider: 1. TODO remove unncessary throws clause from onXXXStart and onXXXEnd methods. 2. TODO consider splitting the onLogin method into two - onLoginStart and onLoginEnd, fire these two methods on the PASS command. I think we can ignore #1, but #2 makes sense so these methods are consistent with the rest. Regarding test cases, I'm not sure what you are looking, if you could provide me some details, I will see what I can do. Sai Pullabhotla Phone: (402) 408-5753 Fax: (402) 408-6861 www.jMethods.com On Thu, Nov 20, 2008 at 3:56 PM, Niklas Gustavsson (JIRA)
        Hide
        Niklas Gustavsson added a comment -

        Modified patch applied in rev 719389. Thanks for your work on this!

        The modifications:

        • Fixed broken tests
        • Did not include the FtpReply in the DefaultFtplet callbacks (like onLogin) since it would silently break every DefaultFtplet subclass out there. If you need the reply, you need to override afterCommand.

        Hope your okay with these changes Sai? if you got the time, I would love to see some unit tests for this patch.

        Show
        Niklas Gustavsson added a comment - Modified patch applied in rev 719389. Thanks for your work on this! The modifications: Fixed broken tests Did not include the FtpReply in the DefaultFtplet callbacks (like onLogin) since it would silently break every DefaultFtplet subclass out there. If you need the reply, you need to override afterCommand. Hope your okay with these changes Sai? if you got the time, I would love to see some unit tests for this patch.
        Hide
        Sai Pullabhotla added a comment -

        The patch with the enhancements mentioned.

        Show
        Sai Pullabhotla added a comment - The patch with the enhancements mentioned.

          People

          • Assignee:
            Niklas Gustavsson
            Reporter:
            Sai Pullabhotla
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development