org.mule.transport.sftp
Class SftpUtil
java.lang.Object
org.mule.transport.sftp.SftpUtil
public class SftpUtil
- extends Object
Contains reusable methods not directly related to usage of the jsch sftp library
(they can be found in the class SftpClient).
- Author:
- Magnus Larsson
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SftpUtil
public SftpUtil(ImmutableEndpoint endpoint)
createUniqueSuffix
public String createUniqueSuffix(String filename)
getTempDirInbound
public String getTempDirInbound()
isUseTempDirInbound
public boolean isUseTempDirInbound()
getTempDirOutbound
public String getTempDirOutbound()
isUseTempDirOutbound
public boolean isUseTempDirOutbound()
cleanupTempDir
public void cleanupTempDir(SftpClient sftpClient,
String transferFileName,
String tempDir)
getSizeCheckWaitTime
public long getSizeCheckWaitTime()
getArchiveDir
public String getArchiveDir()
getArchiveTempReceivingDir
public String getArchiveTempReceivingDir()
getArchiveTempSendingDir
public String getArchiveTempSendingDir()
isUseTempFileTimestampSuffix
public boolean isUseTempFileTimestampSuffix()
getDuplicateHandling
public String getDuplicateHandling()
getIdentityFile
public String getIdentityFile()
getPassphrase
public String getPassphrase()
cwdToTempDirOnOutbound
public void cwdToTempDirOnOutbound(SftpClient sftpClient,
String endpointDir)
throws IOException
- Changes the directory to the temp-dir on the outbound endpoint. Will
create the directory if it not already exists.
Note, this method is synchronized because it in rare cases can be called from
two threads at the same time and thus cause an error.
- Parameters:
sftpClient
- endpointDir
-
- Throws:
IOException
isKeepFileOnError
public boolean isKeepFileOnError()
copyStreamToFile
public void copyStreamToFile(InputStream input,
File destination)
throws IOException
- Should be moved to a util class that is not based on an endpoint... TODO: why
is this method synchronized?
- Parameters:
input
- destination
-
- Throws:
IOException
setErrorOccurredOnInputStream
public void setErrorOccurredOnInputStream(InputStream inputStream)
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.