StandardSftpConnection extends FileTransferConnection { int socketTimeout() { return Long .valueOf(TimeInterval.toMillisecondsDefaultIfNull(getSocketTimeout(), DEFAULT_TIMEOUT)) .intValue(); } StandardSftpConnection();  StandardSftpConnection(ConfigBuilder config, SftpAuthenticationProvider prov); TimeInterval getSocketTimeout(); void setSocketTimeout(TimeInterval t); String getKnownHostsFile(); void setKnownHostsFile(String k); @Override int defaultControlPort(); ConfigBuilder getConfiguration(); void setConfiguration(ConfigBuilder repo); SftpAuthenticationProvider getAuthentication(); void setAuthentication(SftpAuthenticationProvider p);  }
@Test public void testSocketTimeout() throws Exception { StandardSftpConnection conn = new StandardSftpConnection(); assertNull(conn.getSocketTimeout()); assertEquals(60000, conn.socketTimeout()); TimeInterval timeout = new TimeInterval(10L, TimeUnit.SECONDS); conn.setSocketTimeout(timeout); assertEquals(timeout, conn.getSocketTimeout()); assertEquals(10000, conn.socketTimeout()); conn.setSocketTimeout(null); assertNull(conn.getSocketTimeout()); assertEquals(60000, conn.socketTimeout()); }