|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.emarsys.ecommon.files.ScpTransferHelper
public class ScpTransferHelper
A helper for transfering files via scp. Currently it supports only public/private-key-authentication. This could be done with the command-line client or with a java-client (this class wraps the implementation of trilead-ssh2) Be aware that those two implementations may behave different. Creationdate: Jan 25, 2008
http://www.trilead.com/Products/Trilead%2DSSH%2D2%2DJava/
Nested Class Summary | |
---|---|
class |
ScpTransferHelper.AcceptOnlyKnownHosts
Accepts only known hosts in the known_hosts - file Creationdate: Jan 25, 2008 |
static class |
ScpTransferHelper.DefaultPrivateKeyFile
The DEFAULT-KEY-FILE to use for authentication. |
static class |
ScpTransferHelper.Implementation
The implementation to use. |
class |
ScpTransferHelper.ScpTransferException
Will be thrown iff the scp-transfer fails Creationdate: Jan 25, 2008 |
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_KNOWN_HOSTS
The default place to look for the known_hosts - file is the home-directory of the user given in the constructor + DEFAULT_KNOWN_HOSTS |
Constructor Summary | |
---|---|
ScpTransferHelper(java.lang.String host,
java.lang.Integer port,
java.lang.String user)
Constructs an ScpTransferHelper for transfer of files with PublicKey-Authentication. |
|
ScpTransferHelper(java.lang.String host,
java.lang.Integer port,
java.lang.String user,
java.lang.String identityFile)
Constructs an ScpTransferHelper for transfer of files with PublicKey-Authentication. |
|
ScpTransferHelper(java.lang.String host,
java.lang.Integer port,
java.lang.String user,
java.lang.String identityFile,
java.lang.String knownHostsFile)
Constructs an ScpTransferHelper for transfer of files with PublicKey-Authentication. |
Method Summary | |
---|---|
void |
transferFile(ScpTransferHelper.Implementation i,
java.lang.String path,
java.lang.String filename)
Transfers the file with implementation i to the current directory on the server. |
void |
transferFile(ScpTransferHelper.Implementation i,
java.lang.String path,
java.lang.String filename,
java.lang.String target)
Transfers the file with implementation i to the given target on the server. |
void |
transferFileWithCmdLineScp(java.lang.String path,
java.lang.String filename)
Deprecated. |
boolean |
transferFileWithCmdLineScp(java.lang.String path,
java.lang.String filename,
java.lang.String target)
Deprecated. |
void |
transferFileWithTrileadJavaScp(java.lang.String path,
java.lang.String filename)
Deprecated. |
void |
transferFileWithTrileadJavaScp(java.lang.String path,
java.lang.String filename,
java.lang.String target)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_KNOWN_HOSTS
Constructor Detail |
---|
public ScpTransferHelper(java.lang.String host, java.lang.Integer port, java.lang.String user)
ScpTransferHelper.DefaultPrivateKeyFile
)
The Implementation verifies the serverkey against the
knownHostsFile. A server not contained in the knownHostsFile
is not accepted.
host
- port
- user
- public ScpTransferHelper(java.lang.String host, java.lang.Integer port, java.lang.String user, java.lang.String identityFile)
host
- port
- user
- identityFile
- public ScpTransferHelper(java.lang.String host, java.lang.Integer port, java.lang.String user, java.lang.String identityFile, java.lang.String knownHostsFile)
host
- port
- user
- identityFile
- knownHostsFile
- Method Detail |
---|
public void transferFile(ScpTransferHelper.Implementation i, java.lang.String path, java.lang.String filename) throws ScpTransferHelper.ScpTransferException
i
- path
- filename
-
ScpTransferHelper.ScpTransferException
public void transferFile(ScpTransferHelper.Implementation i, java.lang.String path, java.lang.String filename, java.lang.String target) throws ScpTransferHelper.ScpTransferException
i
- path
- filename
- target
-
ScpTransferHelper.ScpTransferException
@Deprecated public void transferFileWithTrileadJavaScp(java.lang.String path, java.lang.String filename) throws ScpTransferHelper.ScpTransferException
ScpTransferHelper.ScpTransferException
@Deprecated public void transferFileWithCmdLineScp(java.lang.String path, java.lang.String filename) throws ScpTransferHelper.ScpTransferException
ScpTransferHelper.ScpTransferException
@Deprecated public void transferFileWithTrileadJavaScp(java.lang.String path, java.lang.String filename, java.lang.String target) throws ScpTransferHelper.ScpTransferException
ScpTransferHelper.ScpTransferException
@Deprecated public boolean transferFileWithCmdLineScp(java.lang.String path, java.lang.String filename, java.lang.String target) throws ScpTransferHelper.ScpTransferException
ScpTransferHelper.ScpTransferException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |