@Test public void testCreateLocalTunnel() throws JSchException { SSHService sshService = new SSHServiceImpl(sessionMock, channelExecMock); sshService.createLocalTunnel(PORT, HOST, PORT); verify(sessionMock).setPortForwardingL(PORT, HOST, PORT); }
@Override public void createLocalTunnel(int localPort, String remoteHost, int remotePort) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new RuntimeException(e); } }
SSHServiceImpl implements SSHService { @Override public void createLocalTunnel(int localPort, String remoteHost, int remotePort) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new RuntimeException(e); } } }
SSHServiceImpl implements SSHService { @Override public void createLocalTunnel(int localPort, String remoteHost, int remotePort) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new RuntimeException(e); } } SSHServiceImpl(Session session, Channel channel);  SSHServiceImpl(ConnectionDetails details, IdentityKey identityKey, KnownHostsFile knownHostsFile,
                          int connectTimeout, boolean keepContextForExpectCommand, ProxyHTTP proxyHTTP, String allowedCiphers); }
SSHServiceImpl implements SSHService { @Override public void createLocalTunnel(int localPort, String remoteHost, int remotePort) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new RuntimeException(e); } } SSHServiceImpl(Session session, Channel channel);  SSHServiceImpl(ConnectionDetails details, IdentityKey identityKey, KnownHostsFile knownHostsFile,
                          int connectTimeout, boolean keepContextForExpectCommand, ProxyHTTP proxyHTTP, String allowedCiphers); @Override CommandResult runShell(
            final String command,
            final String characterSet,
            boolean usePseudoTerminal,
            int connectTimeout,
            int commandTimeout,
            boolean agentForwarding); @Override CommandResult runShellCommand(
            String command,
            String characterSet,
            boolean usePseudoTerminal,
            int connectTimeout,
            int commandTimeout,
            boolean agentForwarding); @Override void createLocalTunnel(int localPort, String remoteHost, int remotePort); @Override boolean isConnected(); @Override void close(); @Override boolean saveToCache(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId); @Override void removeFromCache(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId); @Override Session getSSHSession(); @Override Channel getExecChannel(); }
SSHServiceImpl implements SSHService { @Override public void createLocalTunnel(int localPort, String remoteHost, int remotePort) { try { session.setPortForwardingL(localPort, remoteHost, remotePort); } catch (JSchException e) { throw new RuntimeException(e); } } SSHServiceImpl(Session session, Channel channel);  SSHServiceImpl(ConnectionDetails details, IdentityKey identityKey, KnownHostsFile knownHostsFile,
                          int connectTimeout, boolean keepContextForExpectCommand, ProxyHTTP proxyHTTP, String allowedCiphers); @Override CommandResult runShell(
            final String command,
            final String characterSet,
            boolean usePseudoTerminal,
            int connectTimeout,
            int commandTimeout,
            boolean agentForwarding); @Override CommandResult runShellCommand(
            String command,
            String characterSet,
            boolean usePseudoTerminal,
            int connectTimeout,
            int commandTimeout,
            boolean agentForwarding); @Override void createLocalTunnel(int localPort, String remoteHost, int remotePort); @Override boolean isConnected(); @Override void close(); @Override boolean saveToCache(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId); @Override void removeFromCache(GlobalSessionObject<Map<String, SSHConnection>> sessionParam, String sessionId); @Override Session getSSHSession(); @Override Channel getExecChannel(); static final String EXIT_COMMAND; }