org.mule.transport.sftp
Class SftpReceiverRequesterUtil
java.lang.Object
org.mule.transport.sftp.SftpReceiverRequesterUtil
public class SftpReceiverRequesterUtil
- 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 |
SftpReceiverRequesterUtil
public SftpReceiverRequesterUtil(ImmutableEndpoint endpoint)
getAvailableFiles
public String[] getAvailableFiles(boolean onlyGetTheFirstOne)
throws Exception
- Throws:
Exception
retrieveFile
public InputStream retrieveFile(String fileName,
SftpNotifier notifier)
throws Exception
- Throws:
Exception
canProcessFile
protected boolean canProcessFile(String fileName,
SftpClient client,
long fileAge,
long sizeCheckDelayMs)
throws Exception
- Checks if the file has been changed.
Note! This assumes that the time on both servers are synchronized!
- Parameters:
fileName
- The file to checkclient
- instance of StftClientfileAge
- How old the file should be to be considered "old" and not
changedsizeCheckDelayMs
- Wait time (in ms) between size-checks to determine if
a file is ready to be processed.
- Returns:
- true if the file has changed
- Throws:
Exception
- Error
Copyright © 2003-2014 MuleSoft, Inc.. All Rights Reserved.