Skip to content

Commit

Permalink
Added method to created Stateful clients ( #268). (#603)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Rodriguez <daniel.rodriguez@elca.ch>
  • Loading branch information
dajoropo and daniel-rodriguez-elca committed Jun 22, 2020
1 parent eb19325 commit 769c896
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/java/net/schmizz/sshj/SSHClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,19 @@ public SFTPClient newSFTPClient()
return new SFTPClient(new SFTPEngine(this).init());
}

/**
* Stateful FTP client is required in order to connect to Serv-U FTP servers.
* @return Instantiated {@link SFTPClient} implementation.
*
* @throws IOException if there is an error starting the {@code sftp} subsystem
*/
public SFTPClient newStatefulSFTPClient()
throws IOException {
checkConnected();
checkAuthenticated();
return new StatefulSFTPClient(new SFTPEngine(this).init());
}

/**
* Does key re-exchange.
*
Expand Down

0 comments on commit 769c896

Please sign in to comment.