In message <[EMAIL PROTECTED]>, "Mario Ivankovits" wr ites: >1) switch to passive mode by environment setting and code this in = >"FTPClient.createConnection()" >- this is an global setting, but it might depend on the destination host = >what of active/passive has to be selected
There is no createConnection() method in FTPClient (assuming you're talking about Commons Net). Second, there is little chance we're going to make FTPClient behavior dependent on hardcoded system properties. The approach taken in Commons Net is to make behavior programmatically defined (i.e., through the API) and allow applications using the library to decide whether they want to define specific properties that have meaning to the application and allow the application to respond to those properties and set FTPClient or other Commons Net class behavior through the API. In other words, if you want VFS to use passive mode, have VFS make some provision for calling FTPClient.enterLocalPassiveMode() from VFS. Messing with FTPClient is the wrong thing to do. >4) ?? > >If you preferre 2, i would like to vote to make = >"FTPClient.createConnection()" protected instead of "private" so i could = >override this function and set the connection to passive mode in an new = >"FtpPasvFileSystem" class. Again, this is just a bad thing to do. You don't have to and should not touch FTPClient. In your VFS classes, call FTPClient.enterLocalPassiveMode() after logging in to the FTP server. I don't have any comment about how this should be done as I am not involved in VFS development (although everyone involved with Commons Net is certainly happy to serve its needs). I only want to stress that what you're asking for is the responsibility of the application or API built on top of Commons Net and not the responsibility of Commons Net since FTPClient already exposes the desired functionality to be manipulated as appropriate by the consumer of the API. daniel --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
