|
BEAST
|
Upload files using SCP. More...
Public Member Functions | |
| SCPFileUploadHandler () | |
| Default constructor. | |
| void | upload (File src, URI dst) throws IOException |
| Upload a file. | |
Public Member Functions inherited from eu.baltrad.beast.net.FileUploadHandlerBase | |
| URI | appendPath (URI uri, String path) |
| append a path to an URI. | |
Protected Member Functions | |
| SSHClient | connect (URI uri) throws IOException |
| void | disconnect (SSHClient client) throws IOException |
| void | auth (SSHClient client, URI uri) throws IOException |
| void | store (SSHClient client, File src, URI dst) throws IOException |
| int | getPort (URI uri) |
| String | getUser (URI uri) |
| String | getPassword (URI uri) |
| String | getPath (URI uri) |
| SSHClient | acquireSSHClient () |
| DefaultConfig | createDefaultConfig () |
Static Protected Attributes | |
| static final int | DEFAULT_CONNECT_TIMEOUT = 10000 |
| static final int | DEFAULT_SOCKET_TIMEOUT = 60000 |
Upload files using SCP.
Uses ~/.ssh/known_hosts and ~/.ssh/known_hosts2 for host verification and ~/.ssh/id_rsa and ~/.ssh/id_dsa for keys.
More thorough configuration could be provided through query arguments in the future.
|
inline |
Default constructor.
|
inlineprotected |
Reimplemented in eu.baltrad.beast.net.scp.SCPOnlyFileUploadHandler, and eu.baltrad.beast.net.sftp.SFTPFileUploadHandler.
|
inline |
Upload a file.
The implementations should determine if the dst refers to a file or a directory and in case of the former rename the file.
| src | the file to copy |
| dst | the destination URI. |
| IOException | when copying fails |
Implements eu.baltrad.beast.net.FileUploadHandler.