commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michele Laghi <la...@swissinfo.org>
Subject vfs request for addition
Date Mon, 01 Dec 2003 15:24:40 GMT
Hi,
I would like to use sftp but I need to pass properties to the JSch session.

I think the right place to do that would be to add a method

protected void SftpFileSystem.prepareSession(Session);

and invoke this in SftpFileSystem.getChannel() before session.connect();


Could you add this to the code ?

prepareSession could be an empty method which people could overwrite 
according to their needs. In my case I would do something like:

protected void prepareSession(Session session) {
    String addSystemPropsTxt = 
System.getProperty("org.apache.commons.vfs.addSystemPropertiesToSession", 
"false");
    if ("true".equalsIgnoreCase(addSystemPropsTxt.trim())) {
       session.setConfig(System.getProperties());
    }
}

If this is generic enougth it could be implemented instead of an empty 
method (I would then spare me to extend SftpFileSystem).

Regards
Michele

-- 
Michele Laghi
mailto:laghi@swissinfo.org
http://www.xmlBlaster.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message