org.springframework.integration.sftp.config
Class SftpSessionUtils
java.lang.Object
org.springframework.integration.sftp.config.SftpSessionUtils
public class SftpSessionUtils
- extends Object
Provides a single place to handle this tedious chore.
- Author:
- Josh Long
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SftpSessionUtils
public SftpSessionUtils()
buildSftpSessionFactory
public static SftpSessionFactory buildSftpSessionFactory(String host,
String pw,
String usr,
String pvKey,
String pvKeyPass,
int port)
throws Exception
- This method hides the minutae required to build an #SftpSessionFactory.
- Parameters:
host
- the host to connect to.usr
- this is required. It is the username of the credentials being authenticated.pw
- if password authentication is being used (as opposed to key-based authentication) then this is
where you configure the password.pvKey
- the file that is the private keypvKeyPass
- the passphrase used to use the key fileport
- the default (22) is used if the value here is N< 0. The value should be only be set if the port
is non-standard (not 22)
- Returns:
- the SftpSessionFactory that's used to create connections and get us in the right state to start issue
commands against a remote SFTP/SSH filesystem
- Throws:
Exception
- thrown in case of darned near anything
Copyright © 2010. All Rights Reserved.