org.apache.camel.component.file.remote
Class SftpConsumer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer<E>
          extended by org.apache.camel.impl.ScheduledPollConsumer<T>
              extended by org.apache.camel.component.file.remote.RemoteFileConsumer<RemoteFileExchange>
                  extended by org.apache.camel.component.file.remote.SftpConsumer
All Implemented Interfaces:
Runnable, org.apache.camel.Consumer<RemoteFileExchange>, org.apache.camel.Service

public class SftpConsumer
extends RemoteFileConsumer<RemoteFileExchange>


Constructor Summary
SftpConsumer(SftpEndpoint endpoint, org.apache.camel.Processor processor, com.jcraft.jsch.ChannelSftp channel)
           
SftpConsumer(SftpEndpoint endpoint, org.apache.camel.Processor processor, com.jcraft.jsch.ChannelSftp channel, ScheduledExecutorService executor)
           
 
Method Summary
protected  String getFullFileName(com.jcraft.jsch.ChannelSftp.LsEntry sftpFile)
           
 long getLastPollTime()
           
 String getRegexPattern()
           
protected  boolean isMatched(com.jcraft.jsch.ChannelSftp.LsEntry sftpFile)
           
 boolean isRecursive()
           
protected  void poll()
           
protected  void pollDirectory(String dir)
           
 void setLastPollTime(long lastPollTime)
           
 void setRecursive(boolean recursive)
           
 void setRegexPattern(String regexPattern)
           
 
Methods inherited from class org.apache.camel.impl.ScheduledPollConsumer
doStart, doStop, getDelay, getInitialDelay, getTimeUnit, isUseFixedDelay, run, setDelay, setInitialDelay, setTimeUnit, setUseFixedDelay
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
getEndpoint, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
isStarted, isStopped, isStopping, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

SftpConsumer

public SftpConsumer(SftpEndpoint endpoint,
                    org.apache.camel.Processor processor,
                    com.jcraft.jsch.ChannelSftp channel)

SftpConsumer

public SftpConsumer(SftpEndpoint endpoint,
                    org.apache.camel.Processor processor,
                    com.jcraft.jsch.ChannelSftp channel,
                    ScheduledExecutorService executor)
Method Detail

poll

protected void poll()
             throws Exception
Specified by:
poll in class org.apache.camel.impl.ScheduledPollConsumer<RemoteFileExchange>
Throws:
Exception

pollDirectory

protected void pollDirectory(String dir)
                      throws Exception
Throws:
Exception

getFullFileName

protected String getFullFileName(com.jcraft.jsch.ChannelSftp.LsEntry sftpFile)
                          throws IOException
Throws:
IOException

isMatched

protected boolean isMatched(com.jcraft.jsch.ChannelSftp.LsEntry sftpFile)

isRecursive

public boolean isRecursive()

setRecursive

public void setRecursive(boolean recursive)

getLastPollTime

public long getLastPollTime()

setLastPollTime

public void setLastPollTime(long lastPollTime)

getRegexPattern

public String getRegexPattern()

setRegexPattern

public void setRegexPattern(String regexPattern)


Copyright © 2007 Apache Software Foundation. All Rights Reserved.