org.springframework.integration.sftp.session
Class SftpSessionUtils
java.lang.Object
org.springframework.integration.sftp.session.SftpSessionUtils
public abstract class SftpSessionUtils
- extends java.lang.Object
Utility methods for SFTP Session management.
Method Summary |
static SftpSessionFactoryBean |
buildSftpSessionFactory(java.lang.String host,
java.lang.String pw,
java.lang.String usr,
java.lang.String pvKey,
java.lang.String pvKeyPass,
int port)
This method hides the minutae required to build an #SftpSessionFactory. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SftpSessionUtils
public SftpSessionUtils()
buildSftpSessionFactory
public static SftpSessionFactoryBean buildSftpSessionFactory(java.lang.String host,
java.lang.String pw,
java.lang.String usr,
java.lang.String pvKey,
java.lang.String pvKeyPass,
int port)
throws java.lang.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:
java.lang.Exception
- thrown in case of darned near anything