You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Michele Laghi <la...@swissinfo.org> on 2003/12/01 16:24:40 UTC
vfs request for addition
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