public class SftpServer extends Object
| Constructor and Description |
|---|
SftpServer(Integer port,
String user,
String password,
String pathFilePublicKeyInPemFormat)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Integer |
getPort() |
org.apache.sshd.server.SshServer |
getSshServer() |
Path |
getTmpBaseDir() |
void |
makeDirectory(String directoryName)
Makes a new directory in the SFTP root.
|
void |
setPort(Integer port) |
void |
start()
Sets up a server on the fly.
|
void |
stop()
Stops the server.
|
public SftpServer(Integer port, String user, String password, String pathFilePublicKeyInPemFormat)
port - port that should be useduser - user that is authorized to access serverpassword - password for authorizationpathFilePublicKeyInPemFormat - null or a file with public key that the the server should accept for key file authenticationpublic Path getTmpBaseDir()
public Integer getPort()
public void setPort(Integer port)
public org.apache.sshd.server.SshServer getSshServer()
public void start()
throws IOException
IOException - if an exception occurs while creating a filepublic void stop()
throws IOException
IOException - if any i/o problemspublic void makeDirectory(String directoryName)
directoryName - the name of the directoryCopyright © 2017–2020. All rights reserved.