[ 
https://issues.apache.org/jira/browse/FTPSERVER-344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dave Roberts updated FTPSERVER-344:
-----------------------------------

    Attachment: ftpStatistics2.patch

I don't like my first patch.  Getting the FtpStatistics to then set the 
Observers seems wrong, and counter intuitive to the rest of the setup for the 
server.

I think the Observers should be set as part of the ConnectionConfigFactory, 
which also makes it easier for the Spring configuration.

What we then need is a means of setting the Observers within the FtpStatistics. 
 This should probably be done within DefaultFtpServer.start().  I thought about 
moving the Observers out of (Default)FtpStatistics but that simply means more 
changes are required within the command implementations such as STOR and RETR.  
So perhaps start() would simply get the Observers from the ConnectionConfig and 
set them in the FtpStatistics.

Comments?

> Allow configuration of FileObserver and StatisticsObserver
> ----------------------------------------------------------
>
>                 Key: FTPSERVER-344
>                 URL: https://issues.apache.org/jira/browse/FTPSERVER-344
>             Project: FtpServer
>          Issue Type: Improvement
>            Reporter: Dave Roberts
>         Attachments: ftpStatistics.patch, ftpStatistics2.patch
>
>
> Setting this Observers currently involves a lot of casting and use of 
> "internal" classes and interfaces.
> These need to be exposed to the public interfaces.
> The simplest idea would seem to be to push the methods up to the 
> FtpStatistics interface.  However, these are only exposed through the Ftplet 
> which are runtime objects, so a better mechanism is required.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to