@Test public void testConnect() throws Exception { final Path path = new FTPWorkdirService(session).find(); assertNotNull(path); assertEquals(path, new FTPWorkdirService(session).find()); assertTrue(session.isConnected()); }
@Override public FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt) throws BackgroundException { try { final CustomTrustSSLProtocolSocketFactory f = new CustomTrustSSLProtocolSocketFactory(trust, key, preferences.getProperty("connection.ssl.protocols.ftp").split(",")); final LoggingProtocolCommandListener listener = new LoggingProtocolCommandListener(this); final FTPClient client = new FTPClient(host.getProtocol(), f, f.getSSLContext()) { @Override public void disconnect() throws IOException { try { super.disconnect(); } finally { this.removeProtocolCommandListener(listener); } } }; client.addProtocolCommandListener(listener); this.configure(client); client.connect(new PunycodeConverter().convert(host.getHostname()), host.getPort()); client.setTcpNoDelay(false); return client; } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } }
FTPSession extends SSLSession<FTPClient> { @Override public FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt) throws BackgroundException { try { final CustomTrustSSLProtocolSocketFactory f = new CustomTrustSSLProtocolSocketFactory(trust, key, preferences.getProperty("connection.ssl.protocols.ftp").split(",")); final LoggingProtocolCommandListener listener = new LoggingProtocolCommandListener(this); final FTPClient client = new FTPClient(host.getProtocol(), f, f.getSSLContext()) { @Override public void disconnect() throws IOException { try { super.disconnect(); } finally { this.removeProtocolCommandListener(listener); } } }; client.addProtocolCommandListener(listener); this.configure(client); client.connect(new PunycodeConverter().convert(host.getHostname()), host.getPort()); client.setTcpNoDelay(false); return client; } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } } }
FTPSession extends SSLSession<FTPClient> { @Override public FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt) throws BackgroundException { try { final CustomTrustSSLProtocolSocketFactory f = new CustomTrustSSLProtocolSocketFactory(trust, key, preferences.getProperty("connection.ssl.protocols.ftp").split(",")); final LoggingProtocolCommandListener listener = new LoggingProtocolCommandListener(this); final FTPClient client = new FTPClient(host.getProtocol(), f, f.getSSLContext()) { @Override public void disconnect() throws IOException { try { super.disconnect(); } finally { this.removeProtocolCommandListener(listener); } } }; client.addProtocolCommandListener(listener); this.configure(client); client.connect(new PunycodeConverter().convert(host.getHostname()), host.getPort()); client.setTcpNoDelay(false); return client; } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } } FTPSession(final Host h);  FTPSession(final Host h, final X509TrustManager trust, final X509KeyManager key); }
FTPSession extends SSLSession<FTPClient> { @Override public FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt) throws BackgroundException { try { final CustomTrustSSLProtocolSocketFactory f = new CustomTrustSSLProtocolSocketFactory(trust, key, preferences.getProperty("connection.ssl.protocols.ftp").split(",")); final LoggingProtocolCommandListener listener = new LoggingProtocolCommandListener(this); final FTPClient client = new FTPClient(host.getProtocol(), f, f.getSSLContext()) { @Override public void disconnect() throws IOException { try { super.disconnect(); } finally { this.removeProtocolCommandListener(listener); } } }; client.addProtocolCommandListener(listener); this.configure(client); client.connect(new PunycodeConverter().convert(host.getHostname()), host.getPort()); client.setTcpNoDelay(false); return client; } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } } FTPSession(final Host h);  FTPSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override boolean isConnected(); @Override void interrupt(); @Override FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt); @Override Protocol.Case getCaseSensitivity(); @Override boolean alert(final ConnectionCallback callback); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type); }
FTPSession extends SSLSession<FTPClient> { @Override public FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt) throws BackgroundException { try { final CustomTrustSSLProtocolSocketFactory f = new CustomTrustSSLProtocolSocketFactory(trust, key, preferences.getProperty("connection.ssl.protocols.ftp").split(",")); final LoggingProtocolCommandListener listener = new LoggingProtocolCommandListener(this); final FTPClient client = new FTPClient(host.getProtocol(), f, f.getSSLContext()) { @Override public void disconnect() throws IOException { try { super.disconnect(); } finally { this.removeProtocolCommandListener(listener); } } }; client.addProtocolCommandListener(listener); this.configure(client); client.connect(new PunycodeConverter().convert(host.getHostname()), host.getPort()); client.setTcpNoDelay(false); return client; } catch(IOException e) { throw new FTPExceptionMappingService().map(e); } } FTPSession(final Host h);  FTPSession(final Host h, final X509TrustManager trust, final X509KeyManager key); @Override boolean isConnected(); @Override void interrupt(); @Override FTPClient connect(final Proxy proxy, final HostKeyCallback callback, final LoginCallback prompt); @Override Protocol.Case getCaseSensitivity(); @Override boolean alert(final ConnectionCallback callback); @Override void login(final Proxy proxy, final LoginCallback prompt, final CancelCallback cancel); @Override @SuppressWarnings("unchecked") T _getFeature(final Class<T> type);  }