class CachedConnection implements Connection {

    @Override
    public ChannelSftp getSFtp() {
        if (isClosed()) {
            throw new IllegalStateException("Connection is closed.");
        }

        try {
            final ChannelSftp sftp = (ChannelSftp) session.openChannel("sftp");
            channels.add(sftp);
            return sftp;
        } catch (final JSchException e) {
            throw new RuntimeException("Failed to open SFTP channel.", e);
        }
    }

    public  CachedConnection(final String username, final String password, final URI serverAddress,
            final ConnectionLibrarian<CachedConnection> librarian);
    public  CachedConnection(final String username, final String salt, final URI privateKeyLocation,
            final URI serverAddress, final ConnectionLibrarian<CachedConnection> librarian);

}