mina-ftpserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niklas Gustavsson" <nik...@protocol7.com>
Subject Re: Dictating the order in which Ftplets are executed
Date Sat, 15 Nov 2008 08:22:16 GMT
On Sat, Nov 15, 2008 at 12:12 AM, Sai Pullabhotla
<sai.pullabhotla@jmethods.com> wrote:
> I see that the FTPServer allows one to register multiple Ftplets. How
> would one dictate the order of these Ftplet executions. The order may
> not matter in most cases, however, I do see that the
> beforeCommand/afterCommand methods may return NO_FTPLET to indicate no
> other Ftplets should be executed. So, the question is - if I've
> Ftplet1 and Ftplet2, and I register both of them using
> FtpServer.setFtplets(Map<String, Ftplet), how can I be guaranteed that
> Ftplet1 gets executed first and then Ftplet2.
> Perhaps, we need to use a LinkedHashMap which maintains the elements
> in the order they were inserted into the map, thus have a predictable
> order of execution instead of leaving it to the caller of the API.

Yes, we should investigate how to do this with the Spring config (it
uses a special Map implementation, I'm not sure if a linked version
exists). For embedders, they should be able to provide a
LinkedHashMap, but lets make sure it works by adding some tests. Can
you file a JIRA issue?


View raw message