commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <>
Subject [VFS] Feedback on VFS-422 please
Date Thu, 21 Jun 2012 21:00:18 GMT
Hi All:

WRT VFS-422: [SFTP] Allows to create other channels in SftpFileSystem (

I'll like to solicit feedback from the list on this issue. I've cleaned up
the proposed patch in the ticket and attached it back to the issue as

First and foremost is whether this feature should be in VFS at all.

Internally, VFS does not use the feature, so it is a convenience to the
client application.

A simpler solution from VFS' POV would be to make the Jsch Session object
accessible via a public getSession() method. The client would then be
responsible for the resources created and be free to use all of the Jsch
bells and whistles.

One can argue that this breaks encapsulation and surfaces VFS' private
parts (pun intended). But because the point of the feature is get to
another Jsch object (a Channel) through a Session, encapsulation would be
broken anyway, so this point is moot IMO.

A second issue has to do with implementation of the method

- Should finalization be used?
- Should the counts be managed through the connect and disconnect methods
- There is a lot of repeated code in the method, should a delegate/proxy to
a channel be used instead such that there is no code duplication?

Thank you,

E-Mail: |
JUnit in Action, 2nd Ed: <http://goog_1249600977>
Spring Batch in Action: <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message