Package org.pentaho.di.job.entries.sftp
Class SFTPClient
java.lang.Object
org.pentaho.di.job.entries.sftp.SFTPClient
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSFTPClient
(InetAddress serverIP, int serverPort, String userName) Init Helper Class with connection settingsSFTPClient
(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename) Init Helper Class with connection settingsSFTPClient
(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename, String passPhrase) Init Helper Class with connection settings -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
createFolder
(String path) Creates the given folder.void
String[]
dir()
void
boolean
folderExists
(String foldername) void
Deprecated.void
org.apache.commons.vfs2.FileType
getFileType
(String filename) int
void
void
put
(InputStream inputStream, String remoteFile) void
pwd()
void
renameFile
(String sourcefilename, String destinationfilename) Rename the file.void
setCompression
(String compression) void
-
Field Details
-
PROXY_TYPE_SOCKS5
- See Also:
-
PROXY_TYPE_HTTP
- See Also:
-
HTTP_DEFAULT_PORT
- See Also:
-
SOCKS5_DEFAULT_PORT
- See Also:
-
SSH_DEFAULT_PORT
public static final int SSH_DEFAULT_PORT- See Also:
-
-
Constructor Details
-
SFTPClient
public SFTPClient(InetAddress serverIP, int serverPort, String userName) throws org.pentaho.di.core.exception.KettleJobException Init Helper Class with connection settings- Parameters:
serverIP
- IP address of remote serverserverPort
- port of remote serveruserName
- username of remote server- Throws:
org.pentaho.di.core.exception.KettleJobException
-
SFTPClient
public SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename) throws org.pentaho.di.core.exception.KettleJobException Init Helper Class with connection settings- Parameters:
serverIP
- IP address of remote serverserverPort
- port of remote serveruserName
- username of remote serverprivateKeyFilename
- filename of private key- Throws:
org.pentaho.di.core.exception.KettleJobException
-
SFTPClient
public SFTPClient(InetAddress serverIP, int serverPort, String userName, String privateKeyFilename, String passPhrase) throws org.pentaho.di.core.exception.KettleJobException Init Helper Class with connection settings- Parameters:
serverIP
- IP address of remote serverserverPort
- port of remote serveruserName
- username of remote serverprivateKeyFilename
- filename of private keypassPhrase
- passphrase- Throws:
org.pentaho.di.core.exception.KettleJobException
-
-
Method Details
-
login
- Throws:
org.pentaho.di.core.exception.KettleJobException
-
chdir
- Throws:
org.pentaho.di.core.exception.KettleJobException
-
dir
- Returns:
- Files in current directory
- Throws:
org.pentaho.di.core.exception.KettleJobException
-
get
public void get(org.apache.commons.vfs2.FileObject localFile, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException - Throws:
org.pentaho.di.core.exception.KettleJobException
-
get
@Deprecated public void get(String localFilePath, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException Deprecated.- Parameters:
localFilePath
-remoteFile
-- Throws:
org.pentaho.di.core.exception.KettleJobException
-
pwd
- Throws:
org.pentaho.di.core.exception.KettleJobException
-
put
public void put(org.apache.commons.vfs2.FileObject fileObject, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException - Throws:
org.pentaho.di.core.exception.KettleJobException
-
put
public void put(InputStream inputStream, String remoteFile) throws org.pentaho.di.core.exception.KettleJobException - Throws:
org.pentaho.di.core.exception.KettleJobException
-
delete
- Throws:
org.pentaho.di.core.exception.KettleJobException
-
createFolder
Creates the given folder. The can be either absolute or relative. Allows creation of nested folders.- Throws:
org.pentaho.di.core.exception.KettleJobException
-
renameFile
public void renameFile(String sourcefilename, String destinationfilename) throws org.pentaho.di.core.exception.KettleJobException Rename the file.- Throws:
org.pentaho.di.core.exception.KettleJobException
-
getFileType
public org.apache.commons.vfs2.FileType getFileType(String filename) throws org.pentaho.di.core.exception.KettleJobException - Throws:
org.pentaho.di.core.exception.KettleJobException
-
folderExists
-
setProxy
public void setProxy(String host, String port, String user, String pass, String proxyType) throws org.pentaho.di.core.exception.KettleJobException - Throws:
org.pentaho.di.core.exception.KettleJobException
-
disconnect
public void disconnect() -
getPrivateKeyFileName
-
getPrivateKeyPassPhrase
-
getPassword
-
getServerPort
public int getServerPort() -
getUserName
-
getServerIP
-
setCompression
-
getCompression
-
get(FileObject, String)