INT-1664, INT-1665 added isOpen() method to the Session strategy, added check for stale connection to the CachingSessionFactory which will ensure that it only returns valid (non-stale) Session

This commit is contained in:
Oleg Zhurakousky
2010-12-06 09:06:29 -05:00
parent 0f761f3adb
commit 583b2771cd
5 changed files with 43 additions and 40 deletions

View File

@@ -39,6 +39,7 @@ import com.jcraft.jsch.SftpException;
* @author Josh Long
* @author Mario Gray
* @author Mark Fisher
* @author Oleg Zhurakousky
* @since 2.0
*/
class SftpSession implements Session {
@@ -136,4 +137,8 @@ class SftpSession implements Session {
}
}
public boolean isOpen() {
return this.channel.isConnected() && this.jschSession.isConnected();
}
}